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 107 views
2 answers 180 views
1 answer 130 views
2 answers 136 views
1 answer 110 views
2 answers 188 views
...