i'm trying to encapsolate my code inside an immediate function that later on will be accessed via the global variable x and act like a "module".
code:
var x = (function () {
console.log(x); // undefined
console.log(this); // undefined
})();
But I don't understand why I cant use this
to refer to the function itself.
EDIT:
the immediate function is inside another function in strict mode ("use strict"
)