JavaScript has a sort() method that you can use on arrays, but the results are almost always weird and don’t return what you initially expect. For example, if you have the following [9, 8, 12, 1, 33, 21] array, using sort() on it will return [1, 12, 21, 33,