8 ms·
typeof n === 'number' It didn't actually require differentiating between integers and floats, just numbers and other types.
by Justin_Time 13y ago
typeof n === 'number'
It didn't actually require differentiating between integers and floats, just numbers and other types.
- solox3 13y ago> typeof 5.4 "number"
- kirse 13y agoYea, this is what I realized once I saw the puzzle was throwing junk data like "false" on #5. I mentally skipped over Justin_Time's solution, figuring I would just hit a float error case because it was going to be a stickler about integers.
- iainnash 13y agoThis typeof stuff (and having number instead of integer, string, etc) was the hardest part of this for me. Normally javascript function inputs aren't this messy.
- deleted 13y ago[deleted]