If you're just interested in checking for integers, you can use the match function as follows, the regular expression for numbers is more complex, and you probably would be better off following the casting method provided by Patrick.
if (s.match(/^\d+$/)){//do something}
Of course, if you still need to drop it, then using isNaN makes sense. Just thought that I would suggest an alternative if you are not going to give it up.
This code will return true if s contains only digits (without spaces, decimals, letters, etc.) and requires at least 1 digit.
Statuswoe
source share