Answers for "how to know the highest and smallest element in array"

10

how to find smallest number in array js

const arr = [14, 58, 20, 77, 66, 82, 42, 67, 42, 4]
const min = Math.min(...arr)
console.log(min)
Posted by: Guest on February-16-2020
-1

js get smallest value of array

Array.min = function( array ){
    return Math.min.apply( Math, array );
};
var minimum = Array.min(array);
Posted by: Guest on February-25-2021

Code answers related to "how to know the highest and smallest element in array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language