Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Creating JavaScript Class

// constructor function
function Person () {
    this.name = 'John',
    this.age = 23
}

// create an object
const person1 = new Person();
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Creating #JavaScript #Class
ADD COMMENT
Topic
Name
9+4 =