Answers for "javascript min max integer indices"

1

js return the highest and lowest number

console.log(Math.max(1, 3, 2));
// expected output: 3

console.log(Math.max(-1, -3, -2));
// expected output: -1

const array1 = [1, 3, 2];

console.log(Math.max(...array1));
// expected output: 3
Posted by: Guest on July-09-2020
0

javascript index of biggest number

arr.indexOf(Math.max(...arr))
Posted by: Guest on December-20-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language