Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You have to check if the digits are sequential, not if they are ordered. Made the same mistake and had to think about some time to get it.
I don't know where you are from, but where I'm from, neither
7540
nor1590
have sequential digits! ;-)It's not just incrementing or decrementing, it's incrementing or decrementing sequential digits. So,
1234
is valid, but1357
isn't.Good Luck!
In this kata, closing brace may be ")", "}", or "]" . . .
Hint: you can use
console.log()
to see the input string for each test.closing brace without opening one before.