Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to declare a variable inside a class in javascript

class MyClass {
    const MY_CONST = 'string';
    constructor(){
        this.MY_CONST;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #declare #variable #class #javascript
ADD COMMENT
Topic
Name
8+7 =