Electronic Arts interview question

what is wrong with this function