if(!pass || !cpass || !email || !cemail || !user) { // Code here } // Which will check for empty strings (""), null, undefined, false and the numbers 0 and NaN