/*一.变量的作用域要理解闭包,首先必须理解Javascript特殊的变量作用域.变量的作用域无非就是两种:全局变量和局部变量.Javascript语言的特殊之处,就在于函数内部可以直接读取全局变量.*/ var n=999; function f1(){ alert(n); } f1(); // 999//另一方面,在函数外部自然无法读取函数内的局部变量. function f1(){ var n=999; } alert(n); // error//这里有一个地方需要注意,函数内部声明变量的…
Get Started - 前言 But let me be clear: I don't think it's possible to ever fully know JS. That's not an achievement to be obtained, but a goal to strive after. You don't finish knowing everything about JS, you just keep learning more and more as you s…
Don't Block the Event Loop (or the Worker Pool) | Node.js https://nodejs.org/en/docs/guides/dont-block-the-event-loop/ Don't Block the Event Loop (or the Worker Pool) Should you read this guide? If you're writing anything more complicated than a brie…