Constructor invocation

suggest change

When a function is invoked as a constructor with the new keyword this takes the value of the object being constructed

function Obj(name) {
    this.name = name;
}

var obj = new Obj("Foo");

console.log(obj);

This will log

{ name: “Foo” }

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents