javascript - How do you sort alphabetical without case sensitive -


this question has answer here:

how make alpha sort not case sensitive? understand should use tolowercase don't know how.

sort_alpha: function(a,b) {     if (a[0]==b[0]) return 0;     if (a[0]<b[0]) return -1;     return 1; } 

you need turn , b lower case

var lower_a = a.tolowercase(); var lower_b = b.tolowercase(); 

Comments

Popular posts from this blog

c# - HttpResponseMessage System.InvalidOperationException -

sql - Postgresql error: "failed to find conversion function from unknown to text" -