In this chapter weâll populate an array using the push method. Weâll also learn about the remainder operator, which we can use to derive sequential values that cycle in between zero and the desired value.
Using the push Method
Remember that we use curly brackets to create an empty object. We can create an empty array in a similar fashion by using square brackets (Listing 10-1).