convertToInteger should use the parseInt() function
convertToInteger(“56”) should return a number
convertToInteger(“56”) should return 56
convertToInteger(“77”) should return 77
convertToInteger(“JamesBond”) should return NaN
Inside convertToInteger you are passed a string parameter str. parseInt takes a string and returns an integer. So for example: parseInt(“10”) returns the number 10