- 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 coding your solution in index.js
. You can find the solutions to these exercises by checking out the solution
branch.
-
Write a function named
happyHolidays
. This function should not accept any parameters and should return the string"Happy holidays!"
. -
Write a function named
happyHolidaysTo
. This function should accept a parameter of the name of the person you want to wish happy holidays, and return the string"Happy Holidays, ${name}"
-
Write a function named
happyHolidayTo
. This function should accept two parameters, the holiday you want to wish them well for, and the name of the person you're wishing well. This function should return the string"Happy ${holiday}, ${name}"
-
Write a function named
holidayCountdown
. This function should accept two parameters, the holiday name and number of days till that holiday. The function should return the string"It's ${days} until ${holiday}!"
View JavaScript Functions on Learn.co and start learning to code for free.