how to create a class variable in javascript code example Example: variables in js class constructor(){ this.foo = bar }