Say if I had a Javascript array as following and I sorted the array before printing it to console
var f = ["Salil", "Sam", "Anil", "John", "ajay", "Baba"];
f.sort();
console.log(f);
It prints as follows
Anil,Baba,John,Salil,Sameer,ajay
Why does ajay prints last, how does the case of the first letter plays a role?
thanks,
Salil