Posted On: Jan 13, 2023
x=1 has no Variable declared to it
var x =1;
When a variable declared with keyword 'var' its scope is functional scope.
x=1;
when a variable is declared like above then its scope is global. This variable is available to user as 'window.x' . That means it is available in global object of javascript
Never Miss an Articles from us.
Javascript Javascript is an object-oriented computer programming language commonly used to create interactive effects wi..
What is the difference between let and var?..