Why does Promise.all() allow any object to be passed into as an iterable?
example (jsfiddle: https://jsfiddle.net/npqgpcud/6/):
var promise1 = "one";
var promise2 = 2222;
var promise3 = new Promise(function (fulfill, reject) {
fulfill("three");
});
Promise.all([promise1, promise2, promise3]).then(results => {
p1.innerHTML = results[0];
p2.innerHTML = results[1];
p3.innerHTML = results[2];
});
If I wanted to mimic this behaviour for a single promise, is there a recommended solution or is it recommended to use Promise.all([promise]) ?