Answers for "javascript largest number in array"

5

javascript largest number in array

const max = arr => Math.max(...arr);
Posted by: Guest on July-02-2020
2

find highest number in array javascript

function findHighestNumber(nums) {
	
	let inputs = nums.filter((val, i) => nums.indexOf(val) === i)
	let max = Math.max(...nums);
	let min = Math.min(...nums);
  
   return max + (-min);
}

console.log(difference([1, 7, 18, -1, -2, 9]));
Posted by: Guest on June-13-2020

Code answers related to "javascript largest number in array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language