JSFiddle - React, Tailwind, and code Playground
JavaScript
var test = [-42, 0, 8];
var biggest=-Infinity;
const lnMaxNivel = test.reduce(
(item, ac) => (test > ac ? item.nDocumento : ac),
test[0]
);
alert(lnMaxNivel);
var test = [-42, 0, 8];
var biggest=-Infinity;
const lnMaxNivel = test.reduce(
(item, ac) => (test > ac ? item.nDocumento : ac),
test[0]
);
alert(lnMaxNivel);