|
|
Created by Edmond Pruteanu
over 11 years ago
|
|
| Question | Answer |
| Create array | names = Array.new names = Array.new(20) |
| Assign values | names = Array.new(4, "Edy") |
| Elements common to two arrays | array & other_array |
| Concatenate two arrays | array + other_array |
| Removing items from an array that also appear in another array | array - other_array |
| Element at index position | array.at(index) |
| Remove all elements from array | array.clear |
| Delete element at index position | array.delete_at(index) |
| Remove the last element from array | array.pop |
| Push object to the end of array | array.push(obj, ...) |
| Remove duplicate values from array | array.uniq |
There are no comments, be the first and leave one below:
Want to create your own Flashcards for free with GoConqr? Learn more.