![]() |
In JavaScript, the Syntax:myMap.clear();
Example: Here, a map object “myMap” has been created with a single [key, value] pair, and the Map.clear() method is used to remove the [key, value] pair from “myMap”. myMap.size() is used to check the number of [key, value] pairs belonging to the map object. Javascript
Output
1 0 |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |