Skip to content

More Functions #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Re-do saturdayFun with template literals and default argument
  • Loading branch information
kenjelly22 committed May 6, 2025
commit b8759515413b42a6757de1d51a35086eae61e471
19 changes: 15 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
// code your solution here
function saturdayFun(activity) {
// function saturdayFun(activity) {
// switch (activity) {
// case "bathe my dog":
// return "This Saturday, I want to bathe my dog!";
// default:
// return "This Saturday, I want to roller-skate!";
// }
// }

function saturdayFun(activity = "roller-skate") {
switch (activity) {
case "bathe my dog":
return "This Saturday, I want to bathe my dog!";
default:
return "This Saturday, I want to roller-skate!";
activity = "bathe my dog";
}

return `This Saturday, I want to ${activity}!`;
}

function mondayWork(activity) {
Expand All @@ -16,3 +25,5 @@ function mondayWork(activity) {
return "This Monday, I will go to the office.";
}
}

function wrapAdjective() {}