M
Matt
if (123 > 33) will return true
and
if ("123" > 33) will return true
So my question is, if the above behaviors are the same?? If string is
a number, and
compare with another number, it will be the same behavior as compare 2
numbers?
In this case, it is comparing 2 strings that are numbers, so they are
string comparisons here.
correct?
if ("123" > "33") will return true
In this case, "33a" is not a number, that's why when it compare with
another number, it
always return false. correct?
if ("33a" > 33) will return false
please advise. thanks!!
and
if ("123" > 33) will return true
So my question is, if the above behaviors are the same?? If string is
a number, and
compare with another number, it will be the same behavior as compare 2
numbers?
In this case, it is comparing 2 strings that are numbers, so they are
string comparisons here.
correct?
if ("123" > "33") will return true
In this case, "33a" is not a number, that's why when it compare with
another number, it
always return false. correct?
if ("33a" > 33) will return false
please advise. thanks!!