JavaScript: call(), bind() & apply() methods with examples
// Call method
let employeeOne = {
fullName: 'John Doe',
age: 24,
salary: 40000,
salaryHike(hike) {
this.salary += hike
}
};
let employeeTwo = {
fullName: 'Sarah Green',
age: 26,
salary: 60000
};
console.log("Call meth...
harikrishna.hashnode.dev1 min read