Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ jspm_packages/
# Package lockfiles
package-lock.json
yarn.lock
.results.json
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(rideLength) {
if (rideLength > 2500) {
return 'No can do.';
} else if (rideLength > 2000) {
return 'I will gladly take your thirty bucks.'
} else if (rideLength > 400) {
return 'That will be twenty bucks.';
} else {
return 'This one is on me!';
}
}

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.'
}
}