+ 2

ParseInt problem

I try to use parseint on a text input. If I put 2 I get 2 that’s correct . If I enter 2W I get 2 instead of NaN . How to proceed?

16th Feb 2020, 10:42 AM
♥️Alan
♥️Alan - avatar
4 Respuestas
+ 1
Thank you all for your answers ! It helps me very much
16th Feb 2020, 12:40 PM
♥️Alan
♥️Alan - avatar
+ 1
You can use Number() to get your desired effect.
16th Feb 2020, 10:59 AM
ODLNT
ODLNT - avatar