fac19/week6-BGJK

Be careful with redefining variables in the same scope

Opened this issue · 0 comments

jwld commented

verify(jwt, secret, (err, jwt) => {

Here for example jwt is defined twice - once as an argument to verify and then again in the callback. It works but it's not particularly readable and would be easy to forget which value you're referring to - better to rename the second one to something that reflects its "decoded" state.