CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #10

Default Sort Is Lexicographic

hardArrays

📄 Code

Read carefully — what does this print?
1const nums = [10, 2, 1];
2console.log(nums.sort().join(","));

🎯 Your Answer