Pergunta de entrevista da empresa Myself

How to reverse an array without using built in functions.