In Javascript, every object has a proto开发者_开发问答type. Any prototype is an object, therefore any prototype has a prototype.
STORE = { item : function() { } }; STORE.item.prototype.add = function() { alert(\'test 123\'); }; STORE.item.add();
Please see the following script: var x = function(param){ this.data=param; this.y = function(){ 开发者_运维百科alert(this.data)
I have been trying to wrap my head around this one, and a lot of tutorials and sites have been suggesting the creation of a separate event object, which seems to be a bit of overkill for just implemen