+1 for
Initially I returned it as an integer too, but returning mixed types is bad practice and in fact actually broke my tests, so I return it a as string now too.
and for having a test that breaks when this is not the case, tip! worthy :)
The ||
is a pretty clean way, I like that!
Your explanation on why you used the spread operator is glorious! Thank you for giving insight into why you used that :)
I would definitely read a blog post about it. But if you want to save your efforts for a harder challenge, a new one will come up pretty soon :)
Thanks! In that case I'll wait for the next one. This is fun :)