Noticed something potentially odd with JavaScript's sort()
method. Given the following array:
var arr = ['Aaa',
'CUSTREF',
'Copy a template',
'Copy of Statementsmm',
'Copy1 of Default Email Template',
'Copy11',
'Cust',
'Statements',
'zzzz'];
Calling sort on this array:
console.log(arr.sort());
Yields:
["Aaa", "CUSTREF", "Copy a template", "Copy of Statementsmm", "Copy1 of Default Email Template", "Copy11", "Cust", "Statements", "zzzz"]
Is this correct? ie. CUSTREF
is listed first, is this because of it's capital letters?