Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create a class variable js

class foo {
  static myProp = 'bar'
  someFunction() {
    console.log(this.myProp)
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #class #variable #js
ADD COMMENT
Topic
Name
3+8 =