What is the purpose of ‘this’ operator in JavaScript? JavaScript famous keyword this always refers to the current context. ——————————————— Global Variables − A global variable has global scope which means it is visible everywhere in your JavaScript code. Local Variables − A local variable will be visible only within a function where it is…