I have this code in TS
const arr = ["123.2", "abc", "78.3"]; console.log(arr.map((v) => (!isNaN(v) ? Math.floor(v) : v)));