convertToInteger(“56”) should return a number
convertToInteger(“56”) should return 56
convertToInteger(“77”) should return 77
convertToInteger(“JamesBond”) should return NaN
At that I don’t understand the code that I should do?
I try convertTolnteger(“56”)
and of all them same with the code above but it isn’t right
The problem in this section is that instead of var you should pay attention to this part here.
Use parseInt() in the convertToInteger function so it converts the input string str into an integer, and
returns it.
This changes the approach a bit. You shouldn’t be focusing on creating a var for the parseInt inside the function. But to return the parseInt inside the function. I got a bit confused there too and I understand what you meant.