JSFiddle - React, Tailwind, and code Playground
by Sir_Pepe
HTML
<script src="https://rawgit.com/kriskowal/q/v1/q.js"></script>
JavaScript
var promise = new Promise(function(resolve){
resolve([1, 2, 3]);
});
promise.then(function(x){
console.log(x); // > [1, 2, 3] - OK!
});
Promise.all([promise]).then(function(x){
console.log(x); // > [ [1, 2, 3] ] - OK!
});
Promise.all([promise, promise]).then(function(x){
console.log(x); // > [ [1, 2, 3], [1, 2, 3] ] - OK!
});