The new Keyword in JavaScript — What’s Really Happening
The Problem (Before new)
Suppose you want to create multiple users.
const user1 = {
name: "Ashu",
age: 18
};
const user2 = {
name: "Rahul",
age: 20
};
This works… but:
Repetition everywhere
blog.ashu.fun4 min read