What's the easiest way to find the largest number in an array of objects and return that object?
var arr = [ { num: 0.5 }, { num: 1 }, { num: 0.35 }]
Tried to use forEach but couldn't work out a way to do this, other than storing every number and comparing them.
Any help is appreciated. Thanks in advance.