Quick actions

cmd+k|ctrl+k

Navigation

Languages

this

Snippet info

Language

JavaScript

Visibility

public

Author

paulkotov

Created

2017-10-25T05:34:15Z

Updated

2018-01-24T08:08:45Z

var f = function() {
    this.x = 5;
    (function() {
        this.x = 3;
    })();
    console.log(this.x);
};

var obj = {x: 4, m: function() {
    console.log(this.x);
}};


f();
var o = new f();
obj.m();
console.log(o);
INFO