- Notifications
You must be signed in to change notification settings - Fork0
License
Bwolfe-prog/js-functions-lab-js-intro-000
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- Write a function that returns a value
- Write a function that takes in a parameter
- Write a function that takes in multiple parameters
You'll be writing your solution inindex.js
.
In this lab, we're going to develop our communication skills in JavaScript.We're feeling festive, so we're going to be wrapping up common holiday greetingsas functions so that we don't have to repeat ourselves. The beauty of functionsis that we could reuse these functions for the text of greeting cards, forspoken greetings, for song lyrics, etc.
Write a function named
happyHolidays
. This function should not accept anyparameters and should return the string"Happy holidays!"
.Write a function named
happyHolidaysTo
. This function should accept aparameter of the name of the person you want to wish happy holidays, and returnthe string"Happy holidays, ${name}!"
Write a function named
happyHolidayTo
. This function should accept twoparameters, the holiday you want to wish them well for, and the name of theperson you're wishing well. This function should return the string"Happy ${holiday}, ${name}!"
Write a function named
holidayCountdown
. This function should accept twoparameters, the holiday name and number of days till that holiday. The functionshould return the string"It's ${days} days until ${holiday}!"
ViewFunctions Lab on Learn.co and start learning to code for free.
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- JavaScript68.0%
- HTML32.0%