Function findMax(objects) {
var values = [];
// We parse each object in array
_.each(objects, parseObject());
function parseObject(object) {
// We add a value from an object to values array
values.push(object.value);
}
// We pick the maximum value
return Math.Max(values);
}
How to fix errors in code ?