Members of a given array (array of string) will be contained in the letter to delete, each function members after deleting the array according to the numerical order, the original array and sorted array output to the screen, for example: the original array for aar=[" 1 a2b ", "1 c1b1", "eight", "2 c"] processing result should be,8,12,111 [2]
CodePudding user response:
Var arr=[" 1 a2b ", "1 c1b1", "eight", "2 c"].
Var arr2=arr. The map (v=& gt; ParseFloat (v.r eplace (\ D/g, ""))), sort ((a, b)=& gt; A - b);
alert(arr);
Alert (arr2);