I working with array, and i have array with numbers:
var array = [0,10,12,23,56,111,35,66,77,124,54];
As u can see i have number, from this numbers is bigger 124, and i want to return this number.
i try to create some func:
var bigestValue = array.reduce(function (a, b) { return a > b ? a : b; })
if (bigestValue <= 100) {
return 100;
}
But when script is updating it's return for me last values
forloop.[0,10,12,23,56,111,35,66,77,124,54].find(num => num > 100);[0,10,12,23,56,111,35,66,77,124,54].sort((a, b) => a > b ? -1 : 1)[0][0,10,12,23,56,111,35,66,77,124,54].reduce((max, num) => num > max ? num : max, Number.MIN_SAFE_INTEGER)