Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

which object key has highest value javascript

var obj = {a: 1, b: 2, undefined: 1};

Object.keys(obj).reduce(function(a, b){ return obj[a] > obj[b] ? a : b });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #object #key #highest #javascript
ADD COMMENT
Topic
Name
7+3 =