3 ms·
imho a very elegant solution and probably works in most languages, I was surprised by JavaScript's behaviour myself
by tosh 6y ago
imho a very elegant solution and probably works in most languages, I was surprised by JavaScript's behaviour myself
- 1-more 6y agoFor a real fun headscratcher consider [ '9', '10', '11', '12', '13' ].map(parseInt)
- yboris 6y agoThank you for this exercise! I figured it out! [ROT 13] spoiler: cnefrVag frpbaq nethzrag vf onfr, znc frpbaq nethzrag vf vaqrk va neenl. 10 vf gur frpbaq nethzrag, vaqrk 1. cnefrVag(10, 1) unf vyyrtny onfr [0] https://rot13.com/ https://rot13.com/