Pregunta de entrevista de Cisco

JavaScript basics, like hoisting and closure and scope. One algorithm simple sort based question