My goal is to sort the following array lexiographically. Take the following array:
['abc', 'xyz', 'hij', 'def']
In the end it should look like this:
['abc', 'def', 'hij', 'xyz']
I found this question, which shows how to implement it on an array of objects, but I don't know how to convert the code that it sorts a "normal" array.