David T. answered 09/13/15
Tutor
New to Wyzant
Experienced Software Engineer
Inside the for loop you are returning the console.log statement right after calculating temp1, that would prevent you from iterating through the loop.
The other thing is that you are never recalculating temp2 inside the for loop, so if temp1 is not 0 the first time, you will always die.