Skip to content
RED SAG Skills
mediumStudy question · answer published in JavaScript interview questions, so no pointssorting-and-searchingjavascript

Comparator that returns a boolean

A developer writes this to sort numbers. Why is it a bug?

scores.sort((a, b) => a > b)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions