if(!a) // if a is negative,undefined,null,empty value then... { // do whatever } else { // do whatever }