There are 3 ways to create an array in JavaScript.
Let's see a simple code to create an array using object literal.