38
rated 0 times
[
45]
[
7]
/ answers: 1 / hits: 95260
/ 11 Years ago, fri, november 8, 2013, 12:00:00
When I type this in node.js, I get undefined
.
var testContext = 15;
function testFunction() {
console.log(this.testContext);
}
testFunction();
=>undefined
Without var
keyword, it passes (=>15). It's working in the Chrome console (with and without var
keyword).
More From » node.js