DEV Community

Discussion on: You should stop using `parseInt()`

Collapse
 
aminmansuri profile image
hidden_dude

Don't do it.

eval() should never be used on user input.

Often parsing strings to Int is done for security reasons. Using eval() would just lead you to code injection and XSS problems.

Don't do it!