Skip to content

Instantly share code, notes, and snippets.

@richlloydmiles
Last active March 12, 2021 13:06
Show Gist options
  • Save richlloydmiles/bd5d5f365a36ab55cbdded13dde43d75 to your computer and use it in GitHub Desktop.
Save richlloydmiles/bd5d5f365a36ab55cbdded13dde43d75 to your computer and use it in GitHub Desktop.
Question 1
const names = ['George', 'Ringo', 'John', 'Paul']
const getEmailAddress = (name) => new Promise(resolve => setTimeout(resolve(name + '@beetle-mail.com'), 100));
// write a function that prints out all the names with email addresses as an array using the getEmailAddress function
// output should be: ['george@beetle-mail.com', 'ringo@beetle-mail.com', 'john@beetle-mail.com', 'paul@beetle-mail.com']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment