Using Var Keyword In Javascript
Posted by tech on
June 23, 2009
|
|
Quite a lot of people who use Javascript may wonder sometimes why there is a var keyword. Although we may not notice it since there barely will come a point in time where we may not notice it, there is a real purpose for the var keyword. If you place the var keyword beside a variable name inside a function, it will set that variable’s scope to local. Meaning, once the function finishes its task, that variable will become non-existent.
Found this post useful? Buy me a cup of coffee or help support the sponsors on the right.
/rating_on.png)






