Ruby Notes - Arrays

language-features ruby

What is it?

An array is a linear list of objects. You retrieve them via index

What does it look like?

a = [1, 'cat', 3.14]

When should we use it?

Whenever we would like to store some data together in memory.

Any other weird detail?

In ruby, arrays can contain data belonging to different types like in the example shown above.