Though there is another post about closures my question is aimed at a specific block of code in order to make sure after reading the other linked post I was correct in my thinking.
I’m at the following code in the book
function greaterThan(n) {
return function(m) { return m > n; };
}
var greaterThan10 = greaterThan(10);
console.log(greaterThan10(11));
My question is how does the greaterThan10 function remember the value of n? Is this an example of closures?