Using the ParseInt function

Using the ParseInt function


Hi. I’m stuck on Use the ParseInt Function.

Here’s my code:

function convertToInteger(str) 
  var a = parseInt(str);
  return str;


Thanks in advance for any help.


Your function is returning what was passed in: str. I think you meant to return a instead.


Simple as that. Thank you!