Answers for "all the letters of the alphabetically javascript"

10

js sort alphabetically

users.sort((a, b) => a.firstname.localeCompare(b.firstname))
Posted by: Guest on October-19-2020
4

js order alphabetically

// Alphabetically
const ascending = data.sort((a, b) => a[field].localeCompare(b[field]))
// Descending
const descending = ascending.reverse()
Posted by: Guest on November-05-2020

Code answers related to "all the letters of the alphabetically javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language