Sort the array containing the "Seven Wonders of the World" in descending order, and display the result in the output.
Array sorting
Sort in decreasing order
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
let wondersOfWorld = ["Taj Mahal", "Great Wall of China", "Colosseum", "Chichen Itza", "Machu Picchu", "Christ the Redeemer", "Petra"];
wondersOfWorld.reverse();
wondersOfWorld.sort();
console.log(wondersOfWorld);
___
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.