a = [ 1, 3, 5, 7, 9 ] ? [1, 3, 5, 7, 9]
a[2, 2] = ’cat’ ? [1, 3, "cat", 9]
a[2, 0] = ’dog’ ? [1, 3, "dog", "cat", 9]
a[1, 1] = [ 9, 8, 7 ] ? [1, 9, 8, 7, "dog", "cat", 9]
a[0..3] = [] ? ["dog", "cat", 9]
a[5..6] = 99, 98 ? ["dog", "cat", 9, nil, nil, 99, 98]
I can understand how the last four amendments to this array work, but why do they use a[2, 2] = 'cat' and a[2,0] = 'dog' ???
What do the two numbers represent?
Couldnt they just use a[2] = 'dog'?