0
Question 4 Arrays Collections Manipulations
Hi, Correspondingly, can someone please answer question number 4. Thanks!
3 Antworten
+ 2
Ok, so first, add "z" to the array:
arr << "z"
next, remove all duplicates:
arr.uniq!
finally, output the number of its elements:
puts arr.size
Hope this helped
+ 1
Hi Miles! I'll try to help, just post the question, if you can, please.
0
Here's the question to number 4:
Fill in the blanks to add "z" to the array, remove all duplicates, and output the number of its elements.
arr = ["a", "b", "a"]
<< "z"
arr.
puts arr.
size remove freeze uniq! arr