i have this code :
const delay = () => new Promise((resolve) => setTimeout(resolve, 2000));
async function displayScore(score) {
await delay();
console.log(score);
}
async function processScores(scores) {
forEach(scores, async (score) => {
await displayScore(score);
});
}
processScores([1, 2, 3, 4]);
Why am I getting the message that forEach is not defined?