var arr=["c","b","a","f","E"]; arr.sort(function(a,b){return a.toLowerCase()>b.toLowerCase()?1:-1;}); alert(arr);