Monday, January 6, 2014

This and That in Javascript

var i ={
a:89,
herby:function(){
var that = this;
return function()
{
return that.a;
}
}

};
alert(i.herby()());

Mr Crockford's words on the subject are unreadable - I think the editor may have screwed up

No comments:

Post a Comment