The new Keyword in JavaScript
The new keyword in JavaScript is a factory for objects. It automates 4 steps:
Creates a new empty object {}.
Links this object to the constructor's prototype (so it can share methods).
Sets this to
new-key-word-in-js-sajjadalidev.hashnode.dev1 min read