JS

Arrays in JavaScript - The main difference between...

26.

What is the main difference between arrays and objects in JavaScript?

Arrays can store multiple values of any type, while objects store key-value pairs.

Arrays are ordered, while objects are unordered.

Arrays can be accessed using numerical indices, while objects are accessed using keys.

Arrays have a length property, while objects do not.