Comment on You Can't JavaScript Under PressureparentComments−jrawlings12yI just didreturn i.indexOf('.') > -1 ? i.substring(i.indexOf('.')+1) : false;Seemed to pass all test cases−EdgarVerona12yAye, I did similarly, though for some reason I did >= 0 instead of > -1. I wonder what % of people choose one test approach vs. the other?−taternuts12yI chose >= 0, it's fun to learn!
Comments
I just did
return i.indexOf('.') > -1 ? i.substring(i.indexOf('.')+1) : false;
Seemed to pass all test cases
Aye, I did similarly, though for some reason I did >= 0 instead of > -1. I wonder what % of people choose one test approach vs. the other?
I chose >= 0, it's fun to learn!