+ 4
What are arrays used for?
The course outlines how arrays are manipulated, but not how and when to use them.
10 Answers
+ 2
arrays are like 'clusters in math'. objects with similar properties banded together and stored in arrays. By this way a program can easily reach them and manipulate, update, delete or create them.
for example you can create a 'customer class' in Java. with this class you can create a lot of customer objects and store them in an array. you can easily manipulate, delete or update their properties.
+ 2
in Ruby they dont have to be from same data-type which you can use for eg. in reference to databases
+ 1
when you have to store multiple values of same data-type in a single variable
+ 1
arrays are meant to create temporary memory for variable.
+ 1
There are many ways to use the arrays. Queues in general, Array of words to be replaced, Array of characters that are not allowed in user's passwords and in, among other utilities. And we use a lot.
+ 1
Array is a derived data type. It reduces the code of execution when we include arrays in our program
+ 1
An array is just a list of items. The items can be objects, elements, variables' values, etc. You can also create multidimensional arrays ( probably not in Ruby) and matrixes.
+ 1
an array is a sorted list of items.
students = ["Jimmy", "Katie", "Mark", "Veronica"]
+ 1
to store multiple values to 1 variable
0
You can use it to store a combination of numbers like a pin code.