JavaScript: this Operator
Description
The this operator is used to refer the current object. In general, this refers to the calling object in a method.
Syntax
this.propertyName
Parameter
propertyName: The name of the property.
Example:
In the following web document, this operator is used as internal reference property of the form instances.
HTML Code
JS Code
View the example in the browser
See also
Conditional Operator
comma
delete
function
in
instanceof
new
typeof
void
Previous: JavaScript: new Operator
Next: JavaScript: typeof operator
Test your Programming skills with w3resource's quiz.