Skip to content

Conversation

@lincolnanders5
Copy link

The console.log() on line 247 printed out result, but result had not been declared locally inside the function. The callback function took in err, res of which res never got used in the function body. The logged result was then accessing the global variable result defined on line 242.
I was going to change the console.log(result.toString("hex")) to console.log(res.toString("hex")), but the other examples use result so I changed the parameter to be consistent with the rest of the examples.

The console.log printed out `result`, but `result` had not been declared locally inside the function. The callback function took in `err, res` of which `res` never got used in the function body. The logged `result` was then accessing the global variable `result` defined on line 242.
I was going to change the `console.log(result.toString("hex"))` to  `console.log(res.toString("hex"))`, but the other examples use `result` so I changed the parameter to be consistent with the rest of the examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant