Categories
JavaScript Answers

How to push to a JavaScript multidimensional array?

Spread the love

To push to a JavaScript multidimensional array, we call the push method.

For instance, we write

cookieValue.push([productID, itemColorTitle, itemColorPath]);

to call cookieValue.push with an array with the items we want to append the array into the cookieValue array.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *