DEV Community

Discussion on: Array Methods in JS - sort()

Collapse
 
shubhamtiwari909 profile image
Shubham Tiwari

yes it converts them to string then sort that's why we need to manually pass the compare function