JavaScript Closure changing variable value from the outer scope
I don't understand why my returned function didn't change the value of the variable from the outer function. Hi, I wrote js function: function num() { let number = 0; console.log(number) return function() { return number++ } } then run…