Answers for "javascript find highest number"

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 find highest number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language