1. Home
  2. Javascript
  3. Parseint

Converts a string to an integer.

#javascript
var stringVal = "34"; // Returns "34"
parseInt(stringVal); // Returns 34
copy
Full Javascript cheatsheet