Why alert displays undefined (Firefox)?
function f() { alert(this._field); } function User(name) { this._field = name; this.func = function () { /**/ }; } var my_user = new User("Test name"); f.bind(my_user); f(); Why alert displays undefined (Firefox)?
function f() { alert(this._field); } function User(name) { this._field = name; this.func = function () { /**/ }; } var my_user = new User("Test name"); f.bind(my_user); f(); Source: https://ru.stackoverflow.com/questions/558974/
All Articles