Skip to content

Instantly share code, notes, and snippets.

@eamonnboyle
Last active March 23, 2021 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eamonnboyle/107654c3bebbca3907040d3a0fd4a1fd to your computer and use it in GitHub Desktop.
Save eamonnboyle/107654c3bebbca3907040d3a0fd4a1fd to your computer and use it in GitHub Desktop.
Using the new Promise All
const [name, age, startDate] = await promiseAll([
Promise.resolve('Eamonn'),
Promise.resolve(21),
Promise.resolve(new Date(2012, 9, 1)),
]); // [string, number, Date]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment