Can I have a class inside of a function in javascrit code example Example: variables in js class constructor(){ this.foo = bar }