I have an array of numbers. How do I find the highest and the lowest value in that array? What is the simplest solution?
This seems to be the simplest answer to my question:
var arr = [1,2,4]
var min = Math.min(...arr)
var max = Math.max(...arr)
It's based on these answers.