Pergunta de entrevista da empresa ITrust

javascript question based on arrays