Answers for "create a class variable js"

1

variables in js class

constructor(){
    this.foo = bar
}
Posted by: Guest on January-26-2020
0

create a class variable js

class foo {
  static myProp = 'bar'
  someFunction() {
    console.log(this.myProp)
  }
}
Posted by: Guest on October-02-2021

Code answers related to "create a class variable js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language