Function get Biggest Number(): - accepts [2-10] arguments code example
Example 1: get largest number in array javascript
const array1 = [1, 3, 2];
Math.max(...array1);
// expected output: 3
Example 2: javascript index of biggest number
arr.indexOf(Math.max(...arr))
Example 3: rite a function that takes in an array of numbers and outputs the maximum number.
function largestOfFour(arr) {
return arr;
}
largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);