Created
December 17, 2016 13:48
-
-
Save Philocoder93/73d2d747d2e18304178730c3c17481e1 to your computer and use it in GitHub Desktop.
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
| //write your answer below | |
| var sayHello = function(name) { | |
| return "Hello" + name; | |
| }; | |
| var areBothEven = function(a,b) { | |
| if ((a%2 === 0)$$(b%2 ===s 0)) { | |
| return true; | |
| } | |
| else { | |
| return false; | |
| } | |
| }; | |
| var hotOrNot = function(temp) { | |
| if (temp > 75) { | |
| return "hot"; | |
| } | |
| else { | |
| return "not hot"; | |
| } | |
| } | |
| var threeIfNull = function(num) { | |
| if (num === null) { | |
| return 3; | |
| } | |
| else { | |
| return num; | |
| } | |
| }; | |
| var greatest = function(a,b,c) { | |
| if (b > a) { | |
| if (c > b) { | |
| return c; | |
| } | |
| else { | |
| return b; | |
| } | |
| } | |
| else if (a > b) { | |
| if (c > a) { | |
| return c; | |
| } | |
| else { | |
| return a; | |
| } | |
| } | |
| else (a===b) { | |
| if (c > a) { | |
| return c; | |
| } | |
| else { | |
| return a; | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment