Hard
What will be the output of this code?
const array = ['Clément', 'Vincent', 'Baptiste', 'Valentin', 'Thomas', 'Quentin', 'Antonin'];
const sortedArray = array.sort((a, b) => a.localeCompare(b));
console.log(array);
console.log(sortedArray);
Author: Clément DevosStatus: PublishedQuestion passed 194 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about Javascript