Created
October 29, 2016 03:04
-
-
Save jsejcksn/259f22e686d2d2502d6bcf4e534bdeb5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const console = { | |
log: (msg) => { | |
const para = document.createElement('p'); | |
para.insertAdjacentHTML('beforeend', msg); | |
document.body.insertAdjacentElement('beforeend', para); | |
} | |
}; | |
const space = ' '; | |
const empty = ''; | |
const str = 'string'; | |
const num = 42; | |
console.log(isNaN(space)); // false | |
console.log(isNaN(empty)); // false | |
console.log(isNaN(str)); // true | |
console.log(isNaN(num)); // false | |
console.log(+space); // 0 | |
console.log(+empty); // 0 | |
console.log(+str); // NaN | |
console.log(+num); // 42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment