Sort the given array in alphabetical order then print it.
Array sorting
Alphabetically Sorted Array
Report a typo
Sample Input 1:
Sample Output 1:
[ 'black', 'green', 'orange', 'red', 'yellow' ]Write a program in JavaScript
let colors = ['green', 'red', 'yellow', 'orange', 'black'];
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.