Periksa apakah string hanya berisi angka integer angka javascript
let val = '1234567890'
let isnum = /^\d+$/.test(val);
if (isnum) {
// val is a number
}
Anxious Alligator