Created
April 5, 2019 01:31
-
-
Save Andreolle/b6fd8e6e34c2db4d75e18f9c38cd2438 to your computer and use it in GitHub Desktop.
Functions to find bigger or smallest number in passed args
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 getSmallestNumber = (...nums) => Math.min(...nums) | |
const getBiggerNumber = (...nums) => Math.max(...nums) | |
// Ex: | |
// getSmallestNumber(2,1,5,2,6) | |
// = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment