0
Q:

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)
5
Array.min = function( array ){
    return Math.min.apply( Math, array );
};
0

New to Communities?

Join the community