Understanding this, call(), apply(), and bind() in JavaScript
A Simple Problem
You write a function to print a user’s name:
function showName() {
console.log(this.name);
}
Now you have two users:
let user1 = { name: "Aman" };
let user2 = { name: "Riya" };
Qu
aman-kumar.hashnode.dev4 min read