Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

class constructor

class Person {
    constructor(name, age){
        this.name = name;
        this.age = age;
        console.log(this);
    }
}
const person = new Person("YASDASD", 123);

 
PREVIOUS NEXT
Tagged: #class #constructor
ADD COMMENT
Topic
Name
6+5 =