Post 8 made on Saturday December 15, 2007 at 20:01 |
Barry Gordon Founding Member |
Joined: Posts: | August 2001 2,157 |
|
|
I do not know if this is related to your problem, but one issue I have with Java Script is the overloading of the operator "+". In Java Script the Symbol "+" can be concatenation as in string work or addition as in numeric work. The specific instance of the operator is determined by the left operand of the operator. If it is a string then + is concatenate and the right operand is converted to a string. ergo things like:
var a="1"; var b=a+1; system.print("b="+b) will print out b=11
The sequence var a="1"; var b=(a-0)+1; System.print("b="+b) will print b=2
AFAIK isNaN should report everything in the above examples (a or b) to be false i.e they are numeric, but I have just never tried it
|
|
|