Thursday, October 24, 2013

It's kinda cool that a string may be false in JavaScript.

var error = whatever.sanityCheckFormFields(foo, bar, baz);
if(!error) {
   whatever.saveRecord(foo, bar, baz);
} else {
   alert(error);
}

No comments:

Post a Comment