Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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