Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript this Inside Constructor Function

function Person() {

    this.name = 'Jack';
    console.log(this);

}

let person1 = new Person();
console.log(person1.name);
 
PREVIOUS NEXT
Tagged: #javascript #Inside #Constructor #Function
ADD COMMENT
Topic
Name
6+7 =