Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

Bwolfe-prog/js-functions-lab-js-intro-000

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Objectives

  1. Write a function that returns a value
  2. Write a function that takes in a parameter
  3. Write a function that takes in multiple parameters

Instructions

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.

  1. Write a function namedhappyHolidays. This function should not accept anyparameters and should return the string"Happy holidays!".

  2. Write a function namedhappyHolidaysTo. This function should accept aparameter of the name of the person you want to wish happy holidays, and returnthe string"Happy holidays, ${name}!"

  3. Write a function namedhappyHolidayTo. 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}!"

  4. Write a function namedholidayCountdown. 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

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript68.0%
  • HTML32.0%

[8]ページ先頭

©2009-2025 Movatter.jp