Why is this allowed ?
var f = function() {
console.log(this.x);
}.bind({x:1})();
And why this is not or better why I get syntax error in this case ?
function f() {
console.log(this.x);
}.bind({x:1})();
So, why I need function expression syntax to get this work and is there a way to use bind
method directly on function declaration ?