Change Language


Follow Navioo On Twitter

this

Refers to the calling object of a property.

Syntax

 this[.propertyName] 

Example


function Dog(breed) {
   this.breed = breed;
}
Dog.prototype.getBreed = function() {
   return this.breed;
}
var foo = new Dog('Lab');
alert(foo.getBreed()); //Alerts "Lab". 
text_javascript Navioo_docs

Ajax Javascript feed

↑ Grab this Headline Animator