Use parseInt() in the convertToInteger function so it converts the input string str into an integer, and returns it.
By Claire Osinski at Dec 18 2019