The has() method returns a boolean indicating whether an element with the specified key exists or not.
The has() function of the map object accepts a key in string format and returns a boolean value of true if the specified key exists. Otherwise, the function returns false.
fruits.has("apples");