Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Map.prototype.clear()

// Deletes all entries in your Map.

const user = new Map([
  ['First Name', 'Divine'],
  ['Last Name', 'Orji'],
  ['Age', 24],
  [false, 'Dance'],
]);

user.clear()

console.log(user)
// Map(0) {}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
6+1 =