Answers for "find highest and lowest number javascript"

0

Math method to find largest number in javaScript

Math.max()
Math.max(value0)
Math.max(value0, value1)
Math.max(value0, value1, ... , valueN)
Posted by: Guest on June-14-2021
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 highest to lowest

Arrays.sort(array, Collections.reverseOrder());
Posted by: Guest on November-16-2021

Code answers related to "find highest and lowest number javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language