Hello my fellow JavaScript developers π Back in my first job I quickly realized that the FreeCodeCamp front end course I had finished wasn't nearly enough to deal with the hardships of creating scalable and maintainable D3 chart templates. A fact th...
dsmorais.hashnode.dev7 min read
Nice article, good visualizations.
But your explanation of closures is not correct and it happens a lot. You are describing lexical scoping as far as I remember.
A closure "closes" the function.
function a() {
let me = 0;
function b(){
me = 1;
}
return b;
}
let fA = a(); // function is still "in the memory"
fA(); // now it is getting removed "from the memory"
The final execution of b() by calling fA() closes a(). So the name isn't even that bad.
Great compilations with specific comments. I learned few things, thanks.
Hi! On the screenshot under the nullish operator you've got it wrong.
null ?? "foo" =/= null
Golden Azubuike
Web content developer
Educative and cool