I have an array like :
var arr = [["series0","44","24",56,12 ]]
How to trim(remove) the first element, here it is "series0" ? I already tried most predefined js function but could not find solution. Thanks all for great answers.What would be best way to sort the array, i already tried for:
.sort(function(a, b){return a-b})
and also:
arr.sort(function(a,b) {
if (isNaN(a) || isNaN(b)) {
return a > b ? 1 : -1;
}
return a - b;
});
I need the sort result should return like arr=[["series0","12","24","44","56"]] Rather i am getting [["12","24","44","56","series0"]]
arr[0] = arr[0].splice(0, 1);arr[0].shift()arr[0].shift()is simpler