Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

this keyword in javascript

// In JavaScript, the this keyword refers to an object.

const person = {
  firstName: "John",
  lastName : "Doe",
  id       : 5566,
  fullName : function() {
    return this.firstName + " " + this.lastName;
  }
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #keyword #javascript
ADD COMMENT
Topic
Name
8+7 =