JSFiddle - React, Tailwind, and code Playground
HTML
<div id="highest"></div>
JavaScript
categories = {
'personal': 4,
'swag': 3,
'mingle': 2,
'attention': 1
};
function highest(o){
var h = undefined;
for(var key in o){
var current = o[key];
if(h === undefined || current > h){
h = current;
}
}
return h;
}
$("#highest").text(highest(categories));