Реклама

Ruby – arrays

You can create an array by listing some items within square brackets ([]) and separating them with commas. Ruby’s arrays can accomodate diverse object types. Arrays can be concatenated or repeated just as strings can. We can use index numbers to refer to any part of a array. (Negative indices mean offsets from the end of…