I have the following array:
var arr = ["COL10","COL5",
"COL4","COL3",
"COL8","COL9",
"COL2","COL7",
"COL1","COL6"];
console.log("After sort:"+arr.sort());
The output is:
After sort:COL1,COL10,COL2,COL3,COL4,COL5,COL6,COL7,COL8,COL9
But I want it to be:
After sort:COL1,COL2,COL3,COL4,COL5,COL6,COL7,COL8,COL9,COL10
How should I do this?