gibney.org
:
Technology
:
Javascript
:
Experiments
:
Functions as Objects
(Entry Nr. 267, by user 1 |
edit
)
function Dog() { this.bark2times=function() { this.bark(); this.bark(); } this.bark=function() { alert('wuff'); } } Bob=new Dog(); Bob.bark2times();
Create a new entry at this position