Pergunta de entrevista da empresa iProgrammer

I was asked to convert an object into an Array