Pergunta de entrevista da empresa Duo Security

They asked me to create a function that reverses an array. [1,2,3,4] becomes [4,3,2,1]