frozenSet
Creates a frozen Set object.
- Use the
new Set()constructor to create a newSetobject fromiterable. - Set the
add,deleteandclearmethods of the newly created object toundefined, so that they cannot be used, practically freezing the object.