how to find the greatest number in array in js code example Example: javascript largest number in array const max = arr => Math.max(...arr);