Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript Map.prototype.size

// This returns the number of items in a Map

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

console.log(user.size)
// 4
Source by hashnode.dpkreativ.dev #
 
PREVIOUS NEXT
Tagged: #Javascript
ADD COMMENT
Topic
Name
4+6 =