0

If in two cases var text has different value than how will the browser decide which one to put?

11th Dec 2015, 8:18 PM
yasir perwaiz
yasir perwaiz - avatar
6 ответов
+ 1
i think it can only have one value, though it can have sever al functions, so u have to reassign the value, then it goes with the most recently assigned variable. example var explanation=("confusing" ) explanation=("clear") ;{ document.write(explanation)}; --------- result will be clear
26th Jan 2016, 5:37 AM
Dion Matthew Levy
Dion Matthew Levy - avatar
+ 1
it is read from the top down...so if you state var x = 3, and then var x = 4. x will now be four.
3rd Jul 2016, 5:36 PM
CHAVA AMYAKAR
CHAVA AMYAKAR - avatar
+ 1
last line will overwrite the previous one
29th Oct 2016, 1:14 AM
Shekhar Bahuguna
Shekhar Bahuguna - avatar
0
the latter one
23rd Dec 2015, 8:24 PM
Irfan Syed
Irfan Syed - avatar
0
the later assigned value.
30th Apr 2016, 10:37 AM
Yugal Kishor
Yugal Kishor - avatar
0
If properly defined it will go for the most recent
3rd Jul 2016, 4:02 PM
Cele Prince
Cele Prince - avatar