Arrays of Non-Numbers


#1

For the life of me, I can't figure out how to make the arrays of non-numbers work. Any suggestions?


#2

Can you post your code so that we can try to help you?


#3

Consider the number of data types we have to work with. Numbers are just one. An array of numbers, is simple...

nums = [1,2,3,4,5,6,7,8,9]

Non-numbers could be anything else that is recognized data:

string      "string primitive"
Boolean     true 
array       [1,2,3,4]
hash        {"key" => value}

Any of the above can be included in an array. Here, for example, is an array of strings...

string_array = ["Bob", "Carol", "Ted", "Alice"]

#4