JavaScript Set Methods Flashcards
1
Q
add(val)
A
Adds new element to the set
2
Q
has(val)
A
Checks if the val is in the set
3
Q
delete(val)
A
deletes an element from set
4
Q
clear()
A
removes all the elements
5
Q
size
A
Returns the numbers of elements in a set