← Back to challenges

Is the String in Order?

JavaScriptHardlogicstringsvalidation

Instructions

Create a function that takes a string and returns true or false, depending on whether the characters are in order or not.

Examples

isInOrder("abc") ➞ true

isInOrder("innokodakademija") ➞ false

isInOrder("123") ➞ true

isInOrder("xyzz") ➞ true

Notes

You don't have to handle empty strings.

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Is the String a Palindrome?