adspace
What is the difference of using var and not using var in repl while dealing with variables?
Answer Posted / Mohammad Naseem
In Node.js REPL, using 'var' declares a variable globally if it's outside a function or locally within the function. If you don't use 'var', then the variable is treated as a global one.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers