scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
The Rest Parameter Challenge
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

The Rest Parameter Challenge
AboutCommentsNotes
The Rest Parameter Challenge
Expand for more info
index.js
run
preview
console
function getLabelsHtml() {
/*
Challenge:
1. Add parameters.
2. Update the HTML template where you
see **NAME**.
3. Return HTML template for each label.
*/

// `<div class="label-card">
// <p>Dear **NAME** </p>
// <p>${text}</p>
// <p>Best wishes,</p>
// <p>${sender}</p>
// </div>`
}

const text = 'Thank you for all your hard work throughout the year! 🙏🎁'
const sender = 'Tom'

document.getElementById('labels-container').innerHTML = getLabelsHtml(
text,
sender,
{name: 'Sally'},
{name: 'Mike'},
{name: 'Rob'},
{name: 'Harriet'}
)

Console
/index.html
-6:42