DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
ES6: Use class Syntax to Define a Constructor Function
class Vegetable { constructor(name) { this.name = name; } } const carrot = new Vegetable('carrot');
PREVIOUS
NEXT
Tagged:
#Use
#class
#Syntax
#Define
#Constructor
#Function
ADD COMMENT
Topic
COMMENT
Name
6+4 =
Submit