What functions are passed to the Promise when awaiting in javascript?
Consider the following code, which awaits a Promise: async function handleSubmit() { try { await submitForm(answer); } catch (err) { console.log('Error') } } function submitForm(answer) { return new Promise((resolve, reject) => { setTimeout(() => { if (answer !== 'OK') {…