Answer:
Both the above two statements are same. In javascript, even if you don't declare a "var" keyword, it is automatically added.
Note:-
It is always good to use "var" to declare any variable in javascript. It makes the code cleaner and readable.
Thanks and Regards
Akiii
Asked In: Many Interviews |
Alert Moderator