0π
β
As it is written, your function is not bound to any specific context, so this
will refer to the window
object, which is the top-most context.
You should use Function.prototype.bind to make your function bound to your specific context.
console.log(this.titles.find(this.findStart.bind(this)));
0π
βthisβ inside the function own only the code within that function so i assume you want to call the room variable but before that you have to bind βthisβ with the
object that owns the room object
Source:stackexchange.com