Horje
js return the highest and lowest number Code Example
how to return the max and min of an array in javascript
function minMax(arr) {
  return [Math.min(...arr), Math.max(...arr)];
}
Source: edabit.com
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




Javascript

Related
mongoose nested object without id Code Example mongoose nested object without id Code Example
bigget number in an array java script Code Example bigget number in an array java script Code Example
vue 3 Code Example vue 3 Code Example
jquery how to get Id of child in div Code Example jquery how to get Id of child in div Code Example
node terminal readline console Code Example node terminal readline console Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7