Ruby Methods Flashcards

1
Q

|

Array

Set Union

example
(arr | arr)

A

Returns the same array but with duplicates removed. Works with numbers, strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

.uniq

Array

Uniq

example
my_array.uniq

A

Returns the same array but with duplicates removed. Works with numbers, strings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

*args or something

A

any number of arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

*p

A

any number of arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly