Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

promise.all in javascript

const video1 = new Promise((resolve, reject) => {
  resolve("video1 loaded");
});
const video2 = new Promise((resolve, reject) => {
  resolve("Video2 loaded");
});
const video3 = new Promise((resolve, reject) => {
  resolve("video3 loaded");
});

Promise.all([video1, video2, video3]).then((messages) => {
  console.log("messages", messages);
});
Source by keep.google.com #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
2+1 =