Answers for "find highest and lowest number string javascript"

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

find highest and lowest number string javascript

function myFunction(str) {
    var tst = str.split(" ");
    return tst.max();
}
Posted by: Guest on October-29-2021

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language