What is the difference between arrays and objects in terms of iteration methods?
Arrays have built-in iteration methods like forEach and map, while objects do not.
Objects have built-in iteration methods like forEach and map, while arrays do not.
Both arrays and objects have built-in iteration methods like forEach and map.
Neither arrays nor objects have built-in iteration methods like forEach and map.
Arrays in JavaScript have built-in iteration methods like forEach and map, which allow you to easily loop over the elements of the array and perform operations on each element. These methods are not available for objects. While objects in JavaScript do have some built-in iteration methods like Object.keys and Object.values, they are used to iterate over the keys or values of the object, not the object itself.