Domanda di colloquio di ChefSteps

Write a function that given a string number returns the int representation of it

Risposte di colloquio

Anonimo

26 nov 2014

Start with a sum of zero. For each character is the string multiply sum by 10 and then convert it to an int and add to sum.

Anonimo

27 apr 2016

Write a function? If it's JavaScript you can just use parseInt() and be done.