Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript map max value

let m = new Map([['a', 2], ['b',4], ['c',6]])

console.log([...m.entries()].reduce((a, e ) => e[1] > a[1] ? e : a))
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #map #max
ADD COMMENT
Topic
Name
6+4 =