Set JavaScript variable = null, or leave undefined? -


when declaring variables @ top of javascript function, best practice set them equal null, or leave 'undefined'? way ask, circumstances call each option below?

option a:

var = null,     b = null; 

option b:

var a,     b; 

i declare them undefined when don't assign value because undefined after all.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -