how to select a object in a class from a object with a function inside a class js code example Example: variables in js class constructor(){ this.foo = bar }