Good start, however right now you are putting an already defined string (“007”) into the function instead of a generic one. This means that every time you run your function var a would be equal to 7 no matter which number is placed in the function.
You are also currently not returning anything. Try adding a return statement that will return the result of your function.
convertToInteger() = function
str = parameter of convertToInteger function. Note that you can name it anything you want. Like : myString.
convertToInteger(“56”); = when you call the function, the value inside parentheses (in this case “56”) replace the parameter str.
So, inside the curly braces { } you should parseInt() the parameter and then return the variable a.
Omg sorry but It is so hard end I can’t do it!
And you can’t help me more I understand all of this but I have many hours tried everythiing but nothing is right.