Using Var Keyword In Javascript

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.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *