How to Sort Words in JavaScript Using the sort() Method
You've been given an array of words and asked to sort them in alphabetical order. const words = ['red', 'yellow', 'green'] words.sort() console.log(words) // 'green', 'red', 'yellow'] Wow, that was easy! Here's…
