Pregunta de entrevista de Virtusa

How Promise works? What is Promise.all. Write code for both.