Created
March 22, 2023 14:37
-
-
Save periakteon/5c864155b895e50c658d7ba65f88c668 to your computer and use it in GitHub Desktop.
FreeCodeCamp: Use Multiple Conditional (Ternary) Operators (Ex2)
This file contains hidden or 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
function findGreaterOrEqual(a, b) { | |
// if gibi düşünelim | |
// " a === b " true döndüğünde, "a and b are equal" döndürür | |
return (a === b) ? "a and b are equal" | |
// else if gibi düşünelim | |
// " a > b " true döndüğünde, "a is greater" döndürür | |
: (a > b) ? "a is greater" | |
// else gibi düşünelim | |
// kalan tüm durumlarda "b is greater" döndürür | |
: "b is greater"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment