Amazon interview question

Debug this code and make it run.