Uber interview question

extremely simple coding question asked by junior developer