Exercise: String to Integer

Challenge yourself with an exercise in which you'll have to covert a string into an integer.

We'll cover the following

Problem

In this exercise, you are given some numeric string as input. You have to convert the string you are given to an integer.

Do not make use of the built-in int function.

Example:

    "123" -> 123
    "-12332" -> -12332
    "554" -> 554

Get hands-on with 1400+ tech skills courses.