[ad_1]
Array.splice is useful here. I’m sure this solution can be optimized.
array.forEach((item, index) => typeof item !== 'number' && array.splice(index, 1));
6
[ad_2]
solved Find and remove all non numbers from array in JavaScript w/out JQuery
[ad_1]
Array.splice is useful here. I’m sure this solution can be optimized.
array.forEach((item, index) => typeof item !== 'number' && array.splice(index, 1));
6
[ad_2]
solved Find and remove all non numbers from array in JavaScript w/out JQuery