can someone help me, I need to remove alphabets from array of strings and convert it to array of numbers, this is what I did but not getting it right.
const fruits = [" 2", " 1", " 0", "remove this", " 1", " 2", " 0", " 0", " 1", " 0"];
let text = fruits.toString();
var f = text.replace(/[a-z-A-Z]/g, "");
var h = f.split(",");
h.filter(n => n)
console.log(h)
" "that you have as the 4th element? Would help if you showed your expected output