Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript es6 class

class MyClass {
  constructor() {
    this.answer = 42;
  }
}

const obj = new MyClass();
obj.answer; // 42
Source by thecodebarbarian.com #
 
PREVIOUS NEXT
Tagged: #javascript #class
ADD COMMENT
Topic
Name
3+1 =