Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript this Keyword

const person = {
    name: 'John',
    age: 30,

    // accessing name property by using this.name
    greet: function() { console.log('The name is' + ' ' + this.name); }
};

person.greet();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Keyword
ADD COMMENT
Topic
Name
5+6 =