Ask Your Question
1

Is the syntax for creating an array of arrays reversed?

asked 2023-06-03 03:41:19 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-03 04:03:01 +0000

devzero gravatar image

No, the syntax for creating an array of arrays is not reversed. It is done by creating an array containing multiple sub-arrays. Here's an example:

var array = [
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]
];

This creates an array of 3 sub-arrays, each containing 3 elements.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-03 03:41:19 +0000

Seen: 1 times

Last updated: Jun 03 '23