3 ms·
What do you mean by that? A closure like function foo() { var x = 0; return function () { return x++; } } and the equivalent in Python/Rub
by sid0 16y ago
What do you mean by that? A closure like
function foo() {
var x = 0;
return function () { return x++; }
}
and the equivalent in Python/Ruby/any language with closures hides x even better than a private member in Java would.