Mega Code Archive
Categories
/
Ruby
/
Array
Assign string value to an integer array
x = [1, 2, 3, 4] x[2] = "Fish" * 3 puts x[2]