0

Why this "7" is a string?

15th Sep 2016, 11:18 PM
Ninja Turtle
3 Respuestas
+ 4
Actually, it is equal to 7 but not triple-equal. 7 == "7"; //compares the value, which is the same(true) 7 === "7"; //compares the variable type, number to text(false)
16th Sep 2016, 9:38 AM
Niv Brenner
Niv Brenner - avatar
+ 3
Because its inside the quotation marks. "" 7 is not equal to "7"
16th Sep 2016, 1:08 AM
SteveAmaki.com
SteveAmaki.com - avatar
0
Thanks. Now I'm understand.
16th Sep 2016, 10:07 AM
Ninja Turtle