I understand the truth. I just want to know how the following code runs in the nodejs environment
var varFunc = function declareFunc() {
console.log(this);
console.log(global);
console.log(global.declareFunc);
console.log(declareFunc);
}
console.log(this)
varFunc();
Why does console
come out in the end of this code [Function: declareFunc]
?
The last information printed is
console.log(declareFunc);
This sentenceLet’s take a look at this article:
Some little tricks in Nodejs - QueenKing - SegmentFault /a/11...