Tell us what’s happening:
convertToInteger("56")
should return 56
convertToInteger("77")
should return 77
Your code so far
function convertToInteger(str) {
var r =parseInt()
return r;
}
convertToInteger("56");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.106
.