G
gappodi
Why is
0 == "" in JavaScript
Since "A" + 0 != "A" + ""
thank you.
Gap
0 == "" in JavaScript
Since "A" + 0 != "A" + ""
thank you.
Gap
Why is
0 == "" in JavaScript
Why is
0 == "" in JavaScript
Since "A" + 0 != "A" + ""
Why is
0 == "" in JavaScript
Since "A" + 0 != "A" + ""
Why is
0 == "" in JavaScript
Since "A" + 0 != "A" + ""
thank you.
Gap
Why is
0 == "" in JavaScript
Since "A" + 0 != "A" + ""
Douglas Crockford said:Mistakes were made.
Rick said:Thomas said:Steps of evaluation (cf. ECMAScript Ed. 3 Final, sections 11.9.1 to 11.9.3):Why is
0 == "" in JavaScript
0 == ""
+0 == +0
true
"A" + 0 != "A" + ""Since "A" + 0 != "A" + ""
!("A" + +0 == "A" + "")
!("A" + "0" == "A" + "")
!("A0" == "A")
!(false)
true
[...]
i think i see your answer to the OP is correct,
but how do you explain the apparent contradiction
0 == ""
AND
0 == "0"
Rick said:[...] how do you explain the apparent contradiction
0 == ""
AND
0 == "0"
?
Rick Merrill said:i think i see your answer to the OP is correct,
but how do you explain the apparent contradiction
0 == ""
AND
0 == "0"
Joost said:See section 11.8.5 of the emacascript 262 specs:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.