(Copied from another reply) I definitely didn't word that well. To illustrate:
const functionToDebug = params => {
const myDog = 'Fido';
var yourDog = 'Fido';
const someClosure = () => {
debugger
//While debugging from browser, console.log(myDog) throws an error and will say myDog is not defined whereas console.log(yourDog) will work just fine and log 'Fido'
};
};
15
u/ergnui34tj8934t0 May 28 '19
That's in the definition of const and let...