Skip to content
Advertisement

Tag: new-operator

What is the ‘new’ keyword in JavaScript?

The new keyword in JavaScript can be quite confusing when it is first encountered, as people tend to think that JavaScript is not an object-oriented programming language. What is it? What problems does it solve? When is it appropriate and when not? Answer It does 5 things: It creates a new object. The type of this object is simply object.

Advertisement