Skip to content

Instantly share code, notes, and snippets.

@DForshner
Created April 29, 2014 19:03
Show Gist options
  • Select an option

  • Save DForshner/11408994 to your computer and use it in GitHub Desktop.

Select an option

Save DForshner/11408994 to your computer and use it in GitHub Desktop.
How console.assert() behaves with undefined, null, and zero values.
var isNull = null;
console.log(isNull);
console.assert(isNull);
var isUndefined;
console.log(isUndefined);
console.assert(isUndefined);
var isZero = 0;
console.log(isZero);
console.assert(isZero);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment