Set Flashcards

1
Q

Set

A

Let’s you store unique values in an iterable collection

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

Set.add()

A

Does - adds value to the end of Set object

Params - value

Returns - Set obj with added value

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

Set.delete()

A

Does - removes value from Set object

Params- value

Returns - true if value was in Set otherwise false

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

Set.has()

A

Does - checks to see if element exists

Params - value

Returns - True if element exist or false

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

Set.values()

A

Does - returns a new iterator object of values in insertion order

Params - none

Returns- - returns a new iterator object of values in insertion order

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