The forEach() method of an array executes a provided function on every element in the array.

    
    const numbers = [1, 2, 3, 4, 5];

    const result = numbers.forEach((no, index) => {
        numbers[index] = no * 2 });

    console.log(result)
    // undefined

    console.log(numbers)
    // [2, 4, 6, 8, 10]