forked from learn-co-curriculum/phase-1-control-flow-lab
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e696342
commit a7cc528
Showing
1 changed file
with
23 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
function scuberGreetingForFeet(){ | ||
function scuberGreetingForFeet(feet){ | ||
// Write your code here! | ||
// let feet = 0; | ||
if (feet <= 400){ | ||
return "This one is on me!" | ||
} else if(feet >= 2000 && feet<= 2499) { | ||
return "I will gladly take your thirty bucks." | ||
} else { | ||
return "No can do." | ||
|
||
} | ||
} | ||
|
||
function ternaryCheckCity(){ | ||
function ternaryCheckCity(city){ | ||
// Write your code here! | ||
return city === "NYC" ? "Ok, sounds good.":"No go."; | ||
|
||
} | ||
|
||
function switchOnCharmFromTip(){ | ||
function switchOnCharmFromTip(tip){ | ||
// Write your code here! | ||
switch (tip){ | ||
case "generous": | ||
return "Thank you so much."; | ||
case "not as generous": | ||
return "Thank you."; | ||
default: | ||
return "Bye."; | ||
} | ||
|
||
} |