
03-03-2011, 05:13 AM
|
|
Banned
|
Join Date: Feb 2007
Posts: 1,002
|
|
|
Probably bad form to check if a variable exists with
if (var) {...}
because it's coercing the variable to an integer, which could technically coerce to 0 and make the if fail in certain cases where the variable does exist.
Perhaps if (var.type() != -1) {...} is the best way to do it. |
|
|
|