Q. What is the default behavior of the sort() method?

  • (A) Sorts as strings
  • (B) Sorts numerically
  • (C) Random sort
  • (D) Descending order
πŸ’¬ Discuss
βœ… Correct Answer: (A) Sorts as strings
Explanation: sort() converts elements to strings and sorts lexicographically.
Explanation by: Mr. Dubey
sort() converts elements to strings and sorts lexicographically.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
70
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate