Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
function scuberGreetingForFeet(){
// Write your code here!
function scuberGreetingForFeet(n){
if (n <= 400) {
return "This one is on me!";
} else if (n >= 400 && n <= 2000) {
return "That will be twenty bucks.";
} else if (n > 2000 && n < 2500) {
return "I will gladly take your thirty bucks.";
} else {
return "No can do.";
}
}

function ternaryCheckCity(){
// Write your code here!
function ternaryCheckCity(city){
return city === "NYC" ? "Ok, sounds good." : "No go.";
}

function switchOnCharmFromTip(){
// Write your code here!
function switchOnCharmFromTip(tip){
switch(tip){
case 'generous':
return "Thank you so much."
case 'not as generous':
return "Thank you."
default:
return "Bye."
}
}