Created
October 19, 2021 17:32
-
-
Save n8rzz/b84112ae60e33dbfba667704e3b0250c to your computer and use it in GitHub Desktop.
max.ts
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 max = (valueOne: number, valueTwo: number): number => { | |
if (valueOne === valueTwo) { | |
return valueOne; | |
} | |
return valueOne < valueTwo ? valueOne : valueTwo; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment