This function

 This function work in current block in a object



If you want to print current context of a block by this function




When you console.log(this) in function and again in calling then it shows an empty object(vs code) or window(a global variable) in browser



N.B:-this not work under a function …not even in Arrow function
it only work under object....you should try both and see what output you get






Comments

Popular posts from this blog

How function return an Array in JavaScript