Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Math.max + Spread Operator
const myArray = [39,2312,44,3,932,341238,402547,912,233,39,336568,5322130,6401,8562,42,128912,379]
const maxVal = Math.max(...myArray);
console.log(maxVal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment