|
2 | 2 |
|
3 | 3 | ## Objectives
|
4 | 4 |
|
5 |
| -+ Write a function that returns a value |
6 |
| -+ Write a function that takes in a parameter |
7 |
| -+ Write a function that takes in multiple parameters |
8 |
| - |
| 5 | +1. Write a function that returns a value |
| 6 | +2. Write a function that takes in a parameter |
| 7 | +3. Write a function that takes in multiple parameters |
9 | 8 |
|
10 | 9 | ## Instructions
|
11 | 10 |
|
12 |
| -You'll be coding your solution in `index.js`. |
| 11 | +You'll be writing your solution in `index.js`. |
13 | 12 |
|
14 |
| -1. Write a function named `happyHolidays`. This function should not accept any parameters and should return the string `"Happy holidays!"`. |
| 13 | +In this lab, we're going to develop our communication skills in JavaScript. |
| 14 | +We're feeling festive, so we're going to be wrapping up common holiday greetings |
| 15 | +as functions so that we don't have to repeat ourselves. The beauty of functions |
| 16 | +is that we could reuse these functions for the text of greeting cards, for |
| 17 | +spoken greetings, for song lyrics, etc. |
15 | 18 |
|
16 |
| -2. 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}"` |
| 19 | +1. Write a function named `happyHolidays`. This function should not accept any |
| 20 | +parameters and should return the string `"Happy holidays!"`. |
17 | 21 |
|
18 |
| -3. 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}"` |
| 22 | +2. Write a function named `happyHolidaysTo`. This function should accept a |
| 23 | +parameter of the name of the person you want to wish happy holidays, and return |
| 24 | +the string `"Happy Holidays, ${name}"` |
19 | 25 |
|
20 |
| -4. 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} days until ${holiday}!"` |
| 26 | +3. Write a function named `happyHolidayTo`. This function should accept two |
| 27 | +parameters, the holiday you want to wish them well for, and the name of the |
| 28 | +person you're wishing well. This function should return the string |
| 29 | +`"Happy ${holiday}, ${name}"` |
21 | 30 |
|
22 |
| -<p data-visibility='hidden'>View <a href='https://learn.co/lessons/js-functions-lab' title='JavaScript Functions'>JavaScript Functions</a> on Learn.co and start learning to code for free.</p> |
| 31 | +4. Write a function named `holidayCountdown`. This function should accept two |
| 32 | +parameters, the holiday name and number of days till that holiday. The function |
| 33 | +should return the string `"It's ${days} days until ${holiday}!"` |
23 | 34 |
|
24 | 35 | <p class='util--hide'>View <a href='https://learn.co/lessons/js-functions-lab'>Functions Lab</a> on Learn.co and start learning to code for free.</p>
|
0 commit comments