5081 Views
When you work in JavaScript then this keyword changes the context or scope based on how it is used. So here are some examples of how to use this keyword in JavaScript.
function func_1() {
console.log(this);
}
// calling a function
func_1(); // this pointing to window
// as object method
var ...
Sheetal Kumar
Dec 04, 2018