Tutorial by Examples

var Human = function() { this.canWalk = true; this.canSpeak = true; // }; Person.prototype.greet = function() { if (this.canSpeak) { // checks whether this prototype has instance of speak this.name = "Steve" console.log('Hi, I am ' + this.name); } else{ c...

Page 1 of 1