05.11.2014, 02:13
0 is false and 1 is true, what about this -1 and if there is more tell me pls
if (0) {
/*
this code does not run, since 0 is a "false" value
...
*/
}
if (-1) {
/*
this code *does* run, since -1 is a "true" value
...
*/
}
if (myFunction() > -1) {
// this will run if the function is successful
}