3 ms·
Very good point. I thought of it more as pseudocode.
by tobr 6y ago
Very good point. I thought of it more as pseudocode.
- tosh 6y agoimho 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/