Created
February 18, 2023 09:16
-
-
Save schesnowitz/6ead052e9290580cf8e72356c136ce3f to your computer and use it in GitHub Desktop.
min max
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const minMax = (someArray) => { | |
const min = Math.min(...someArray); | |
const max = Math.max(...someArray); | |
return { | |
min, | |
max | |
} | |
}; | |
console.log(minMax([1, 2, 3, 4, 5, 6]) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment