Sorting an array by returning 1 or 0 or -1 if it returns these values how the sort function can decide which one to put first

前端 未结 0 1121
抹茶落季
抹茶落季 2021-01-14 18:08

I don\'t understand the logic of sorting an array by returning 1 or 0 or -1 if it returns these values how the sort function can decide which one to put first

Example

相关标签:
回答
  • 消灭零回复
提交回复
热议问题