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 nor 1590 have sequential digits! ;-)
7540
1590
It's not just incrementing or decrementing, it's incrementing or decrementing sequential digits. So, 1234 is valid, but 1357 isn't.
1234
1357
Good Luck!
In this kata, closing brace may be ")", "}", or "]" . . .
Hint: you can use console.log() to see the input string for each test.
console.log()
closing brace without opening one before.
Loading collection data...
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.