Software Engineer based in West London. With 20 years of experience in IT industry I specialise in building carefully crafted responsive and accessible projects
"Closure is not necessarily a function, it can be any data type" not, exactly. According to MDN: "A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment)." (source: developer.mozilla.org/en-US/docs/W...)
Software Engineer based in West London. With 20 years of experience in IT industry I specialise in building carefully crafted responsive and accessible projects
It's wrong when you phrase it like "JUST a reference that" ("just" suggests it's only that, not "one aspect of") when it's clearly not "just a" :) That's what I meant ;)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
"Closure is not necessarily a function, it can be any data type" not, exactly. According to MDN: "A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment)." (source: developer.mozilla.org/en-US/docs/W...)
That is not wrong. That's just one aspect of closures.
It's wrong when you phrase it like "JUST a reference that" ("just" suggests it's only that, not "one aspect of") when it's clearly not "just a" :) That's what I meant ;)