使用 代码如下:[removed]var isNumeric = function(x) { // returns true if x is numeric and false if it is not. var RegExp = /^(-)?(\d*)(\.?)(\d*)$/; return String(x).match(RegExp);}var myArray = [1,’two’,3,’four’,5,’six’,7,’eight’,9,’ten’];var oddArray=myArray.filter(isNumeric);