All Subjects
Light
A set is a collection of unique elements with no specific order. It does not allow duplicate values.
congrats on reading the definition of set(). now let's actually learn it.
add(): This method adds an element to the set if it is not already present.
contains(): This method checks if a specific element is present in the set.
size(): This method returns the number of elements in the set.