ScriptS
Reactiflux5y ago
5 replies
Script

Script – 23-27 Jan 30

I'm not understanding this kind of sorting
arr = arr.sort((a, b) => a < b ? 1 : -1);


What does 1, -1 mean?
Was this page helpful?