Module Assessment | Yext Hitchhikers Platform
module Quiz
+100 points
Daily Quiz Streak: 0
Quiz Accuracy Streak: 0
Question 1 of 5
Why do we use Handlebars templates? (Select all that apply)
Question 2 of 5
Why are comments useful in Handlebars?
Question 3 of 5
What is the most precise evaluation context if we are using the firstName and lastName fields in our Handlebars template?
{
"personalInfo":
{
"nameInfo":
{
"firstName": "John",
"lastName": "Doe",
"middleName": "Adam",
"suffix": "Jr.",
"nickname": "Jack"
},
"addressInfo":
{
"city": "Austin",
"state": "TX"
}
},
"professionalInfo":
{
"linkedInUrl": "https://linkedin.com/john-doe",
"headshotUrl": "https://johndoe.com/headshot.png"
}
}
Question 4 of 5
Turtlehead Tacos wants to print a list of their menu items, along with calories and a link to the menu item. What's wrong with their code below?
Data:
{
"menuItems": [
{
"name": "Taco",
"calories": "100 calories per taco",
"menuLink": "https://turtleheadtacos.com/tacos"
},
{
"name": "Burritos",
"calories": "500 calories",
"menuLink": "https://turtleheadtacos.com/burritos"
},
{
"name": "Chips and Guacamole",
"calories": "600 calories",
"menuLink": "https://turtleheadtacos.com/chipsandguac"
}]
}
Handlebars Template:
<h1>Our Menu Items</h1> <ul>
{{#each menuItems}}
<li>
{{menuItem.name}} | {{menuItem.calories}} | <a href="{{menuItem.menuLink}}">View Menu Item</a>
</li>
{{/each}}
</ul>
Question 5 of 5
Turtlehead Tacos built their header in Handlebars, and wants to put it on every page on their site without copy/pasting the code. What Handlebars concept will help?
A Hitchhiker in the making! 🔥
You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Sign up for Hitchhikers to start earning points!
If you're already a Hitchhiker, log in to access this content.
<% elem.innerText %>