Last active
January 10, 2020 23:13
-
-
Save amejiarosario/6862c31759b7a989ea88b70857b018ee to your computer and use it in GitHub Desktop.
Code examples from https://adrianmejia.com/most-popular-algorithms-time-complexity-every-programmer-should-know-free-online-tutorial-course
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 isEvenOrOdd(n) { | |
return n % 2 ? 'Odd' : 'Even'; | |
} | |
console.log(isEvenOrOdd(10)); // => Even | |
console.log(isEvenOrOdd(10001)); // => Odd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment