Promatics interview question

They asked me about Javascript basic to advanced level questions, with reversing the array , and sorting the array