|
|
|
|
|
by kirse
4635 days ago
|
|
Fun little puzzles. First 4 went pretty quickly (~8:00) and then the last one took ~7 minutes Googling around for this so I could test if a variable was an integer... n===+n && n===(n|0)
Wish I could see my answers after the fact though!Edit: Read the initial requirements of the puzzle, it says sum all the integers, not all the numbers. People using (typeof i[x] == 'number') just got lucky because the test-cases didn't exercise the full requirements of the puzzle ;) // i will be an array, containing integers and/or arrays like itself.
// Sum all the integers you find, anywhere in the nest of arrays.
|
|
pretty simple no?