DEV Community

Tomopteris
Tomopteris

Posted on

Arrays

What is a structure?

The layout of the array, referring to its layers.

How can you use it?

To use it you make a variable or constant, and encase it in brackets [].

What's the use of index in arrays?

To access data arrays, using the same notation as arrays.

Can you modify a single index or do you need to modify the complete array?

You can modify a single index, you just need to specify which entry.

What's the use of the length property in an array?

To find out, in zero-based indexing, how many values an entry has.

What's the use of the reverse and sort methods?

Reverse reverses the order of items in an array making the last items first, and vice versa. Sort rearranges array items in alphabetical order.

Top comments (0)