Check if string contains only digits September 16, 2022 by Tarik how about let isnum = /^\d+$/.test(val);