Mistery of this
by Daman Daman
JavaScript
function hello(param) {
console.log(this + " says hello " + param);
}
// this is implicit
hello("world")
// this is explicit
hello.call("Daman", "world")
by Daman Daman
function hello(param) {
console.log(this + " says hello " + param);
}
// this is implicit
hello("world")
// this is explicit
hello.call("Daman", "world")