snippet
Get minimum number of array Javascript
const sampleArray = [4,2,3,6,1,8];
const getMinValue = (myArray) => Math.min(...myArray);
getMinValue(sampleArray); // Return 1
Related snippets |
---|