
Víctor Hugo Arango Madrid
Preguntastudent•hace 6 años
const getUserAll = new Promise ( function (todoBien, todoMal) { setTimeout(function () { todoBien() }, 5000) }) const getUser = new Promise ( function (todoBien, todoMal) { setTimeout(function () { todoBien() }, 3000) }) Promise.all([ getUser, getUserAll ]) .then(function () { console.log('Se acabó el tiempo'); }) .catch(function () { console.log('hubo un error en la promesa'); })

Emmanuel García
student•hace 5 años
Le falta un espacio new Promise, por eso no te funciona. PD. probado con tu código
new Promise