diff --git a/index.js b/index.js index 8f86e134cb..34b5019430 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,28 @@ -function scuberGreetingForFeet(){ - // Write your code here! -} +function scuberGreetingForFeet(depth){ + + if (depth <=400) { + return 'This one is on me!' + } else if (depth <= 2000) { + return 'That will be twenty bucks.' + } else if (depth <= 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.` + + } } \ No newline at end of file