Random tech moment: Javascript’s localeCompare() method rocks for sorting arrays of objects by property, with very simple code. Ex: posts.sort( (a, b) => a.title.localeCompare(b.title) ) — Charles Johnson (@Green_Footballs) May 12, 2020
Random tech moment: Javascript’s localeCompare() method rocks for sorting arrays of objects by property, with very simple code. Ex: posts.sort( (a, b) => a.title.localeCompare(b.title) )
— Charles Johnson (@Green_Footballs) May 12, 2020