The new Keyword in JavaScript — From Confusion to Clarity.
If you've ever written JavaScript like this:
function User(name) {
this.name = name;
}
const u1 = new User("Chitta");
…and thought:
"What exactly is new doing behind the scenes?"
You're not alon
csdev.hashnode.dev6 min read