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


Please Help Members By Posting Answers For Below Questions

Is node js losing popularity?

590


How we can read a file in node js?

571