Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Class Has a Constructor Function

class Person
{
  constructor(name)
  {
    this.name = name;
  }
}



console.log(Person.prototype.constructor)
/*will yield class Person{constructor(name)}*/
 
PREVIOUS NEXT
Tagged: #Class #Has #Constructor #Function
ADD COMMENT
Topic
Name
6+8 =