Frogslayer interview question

What could be improved from this block of code?