Pergunta de entrevista da empresa X

Implement parseInt function that takes in a string input and outputs an integer