Skip to content

Instantly share code, notes, and snippets.

@tmcw
Last active August 29, 2015 14:13
Show Gist options
  • Save tmcw/67b28b46283645f2a3b3 to your computer and use it in GitHub Desktop.
Save tmcw/67b28b46283645f2a3b3 to your computer and use it in GitHub Desktop.
Gist from mistakes.io
function incrementZero(number) {
if (number == 0) return number + 1;
return number;
}
incrementZero('');
incrementZero(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment