Skip to content

Instantly share code, notes, and snippets.

@n8rzz
Created October 19, 2021 17:32
Show Gist options
  • Save n8rzz/b84112ae60e33dbfba667704e3b0250c to your computer and use it in GitHub Desktop.
Save n8rzz/b84112ae60e33dbfba667704e3b0250c to your computer and use it in GitHub Desktop.
max.ts
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