Hard
Considering the following code:
function MyObject(){
this.one = function(){
return 1;
};
function two(){
return 2;
};
}
MyObject.prototype.three= 3;
MyObject.four= 4;
var obj = new MyObject();
try{ console.log(obj.one()); } catch(e){}
try{ console.log(obj.two()); } catch(e){}
try{ console.log(obj.three); } catch(e){}
try{ console.log(obj.four); } catch(e){}
Author: Jean-marie CléryStatus: PublishedQuestion passed 2081 times
Edit
Similar QuestionsMore questions about Javascript