javascript - variable is already defined -


sometime need replace variable value another

so use method

var $$test = "first",     $$test = "second"; 

the code work fine use jsfiddle jshint button check error on javascript (it helped me lot)

but got error '$$test' defined

enter image description here

so ideal method re define variable

thank :)

you're getting error because you're declaring same variable twice.

var = foo, = bar; 

is same as:

var = foo; var = bar; 

just break code in 2 lines, , won't warning. this:

var = foo; = bar; 

also notice if declare variable value, , right after change value, first line noop.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -