Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js clear map

const myMap = new Map();
//add some key value pairs

myMap.clear() // clear all key/value pairs
Comment

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) {}
Comment

PREVIOUS NEXT
Code Example
Javascript :: select name get option value jquery 
Javascript :: name arrow function 
Javascript :: array any 
Javascript :: how to check for enter keyPress in react native 
Javascript :: javascript json trypass 
Javascript :: how to use labels in javascript 
Javascript :: arrow functions in javascript 
Javascript :: js loop through form inputs 
Javascript :: jspdf converted pdf save to server 
Javascript :: manually set jquery text box 
Javascript :: submit form with ajax 
Javascript :: sum 2d array javascript 
Javascript :: what is node js 
Javascript :: add parameter submit form javascript 
Javascript :: javascript Spread Operator with Object 
Javascript :: jquery function return 
Javascript :: how to deobfuscate javascript 
Javascript :: react native flex 2 columns per row 
Javascript :: how to use the foreach method in javascript 
Javascript :: The slice JavaScript string method 
Javascript :: repeat a string in javascript 
Javascript :: splice method in javascript 
Javascript :: check data type in js 
Javascript :: express prisma 
Javascript :: sort() object values javascript 
Javascript :: find duplicate element on array 
Javascript :: jquery repeater 
Javascript :: javascript loop 
Javascript :: use of map in react 
Javascript :: difference between ajax and node js 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =