3 ms·
Yes - the trick with JS is to realize it has this functional core, and every object has an __proto__ property, and then most of its syntax is syntactic sugar ov
by jameshart 12y ago
Yes - the trick with JS is to realize it has this functional core, and every object has an __proto__ property, and then most of its syntax is syntactic sugar over the top of that.
new method()
is syntactic sugar for something like
var _tmp = {};
_tmp.__proto__ = method.prototype;
_tmp.call(method);