How to check if object is of type map in Node.js

1 Answer

0 votes
const mp = new Map([
  ['javascript', 1],
  ['node.js', 2],
  ['typescript', 3],
  ['python', 4],
]);

console.log(mp instanceof Map);
 
 
 
   
/*
run:
   
true
   
*/

 



answered Jun 23, 2022 by avibootz

Related questions

1 answer 113 views
2 answers 188 views
1 answer 136 views
2 answers 144 views
1 answer 115 views
2 answers 196 views
...