I read this:
var scores = [1, 10, 21, 2];
scores.sort(); // [1, 10, 2, 21]
Then, I read a description of the difference between
Finally, I read: If compareFunction is not supplied, elements are sorted by converting them to strings and comparing strings in Unicode code point order. In a numeric sort, 9 comes before 80, but because numbers are converted to strings, “80” comes before “9” in Unicode order.
Are the numerical values in
scores.sort(); // [1, 10, 2, 21] actually strings or have they been converted back to ints?