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