Javascript
this
in Javascript what
thisis based on how you invoke the function
new
function Foo() {
this.bar = "baz";
console.log(this);
}
var f = new Foo();
console.log(f.bar);
Learning Resources
MDN Javascript Guide
Javascript Garden
quiz.typeofnan.dev — Learn JavaScript fundamentals through fun and challenging quizzes