1// Async/Await
2const asyncGreeting = async () => 'Greetings';
3// Promises
4const promiseGreeting = () => new Promise(((resolve) => {
5 resolve('Greetings');
6}));
7asyncGreeting().then(result => console.log(result));
8promiseGreeting().then(result => console.log(result));
9