I need to find the highest number from 3 different numbers. The only thing I've found is max() but you can only use 2 numbers.
Whats the best way?
I need to find the highest number from 3 different numbers. The only thing I've found is max() but you can only use 2 numbers.
Whats the best way?
let array = [1,2,3,4,5,6];
let array = [1,2,3,4,5,6];
let largest = 0;
for(let i = 0; i<=largest; i++){
(largest<array[i]? largest = array[i]:0)
}
console.log(largest);