If you want to determine the maximum value among the entries of the object and then find the first entry with that value, you can use the following code:
const maxValue = obj => (entries =>
(max => entries.find(([k, v]) => v === max))
(Math.max(...entries.map(([key, val]) => val))))
(Object.entries(obj));
const obj = {
happy: 0.6,
neutral: 0.1,
said: 0.3
};
const [ key, value ] = maxValue(obj);
console.log(key); // happy
console.log(value); // 0.6
Code golf
You can shorten the above function to only 86 bytes:
f=o=>(e=>(m=>e.find(([,x])=>x===m))(Math.max(...e.map(([,v])=>v))))(Object.entries(o))