Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Last active November 28, 2018 01:18
Show Gist options
  • Save marcelmokos/86d5398fdbc4d81d920a6b37f5afe87e to your computer and use it in GitHub Desktop.
Save marcelmokos/86d5398fdbc4d81d920a6b37f5afe87e to your computer and use it in GitHub Desktop.
Original Value Converted to Number Converted to String Converted to Boolean
false 0 false false
true 1 true true
0 0 0 false
1 1 1 true
0 0 0 true
000 0 000 true
1 1 1 true
NaN NaN NaN false
Infinity Infinity Infinity true
-Infinity -Infinity -Infinity true
0 false
20 20 20 true
twenty NaN twenty true
[] 0 true
function(){} NaN function(){} true
{} NaN [object Object] true
null 0 null false
undefined NaN undefined false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment