The basic use of Set

The elements in a Set are unique

Basic usage of Map

A Map is similar to a dictionary in Python, also in the form of key-value pairs as the basic data structure.

Use the Set method to add key-value pairs to the Map object

  • As in the second example in the above image, it is difficult to call the value of the key if the array is nameless, so we call it by naming the array in advance.