In the JavaScript algorithms & data structure certification’s tutorial titled “Global scope & functions” , it has been mentioned that " Variables which are used without the var
keyword are automatically created in the global
scope". But when I tried to run the following code in my laptop using node, then it gave error :
function func()
{
hw="Hello World!";
}
console.log(hw);
I would be glad if someone can help me out