Is the String in Order?

Published by Matt in

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("edabit") ➞ false

isInOrder("123") ➞ true

isInOrder("xyzz") ➞ true

Notes

You don't have to handle empty strings.

Watch a quick demo on how Edabit works.