Amazon interview question

What are the errors in this code