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 117 views
2 answers 198 views
1 answer 141 views
2 answers 152 views
1 answer 120 views
2 answers 200 views
...