Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMindaugas vaskevicius
211 Pointsi need help with this quiz
I don't get what to put in the fill the blanks question
Steven Parker
231,236 PointsThere's more than one "blanks" question in this quiz.
3 Answers
Kajuanna Smith
Full Stack JavaScript Techdegree Graduate 13,609 Points+=
Indiya Gooch
12,075 PointsConsider the following code:
let greeting = 'Hi';
greeting = greeting + ', Treehouse students!';
Complete this code by adding the operator that produces the same result as the above code:
let greeting = 'Hi';
greeting **+=** ', Treehouse students!';
Reason:The addition assignment operator adds the value of the right operand (the stuff on the right side of the =) to a variable and assigns the result to the variable.
Complete the code below to create a template literal:
const headline = **` **<h1>A Literal Headline</h1> **` **;
Consider the following code:
const name = "Aneesah";
let message = "Hello " + name + ". How are you?";
Complete the code below to recreate the above code using template literal interpolation:
const name = "Aneesah";
let message = ** `Hello ${name}. How are you?` **;
Reason: Template literals are enclosed by the backtick () (grave accent) character instead of double or single quotes.
Template literals can contain placeholders - indicated by the dollar sign and curly braces (${expression}). The expressions in the placeholders and the text between the backticks (
) get passed to a function.
The default function just concatenates the parts into a single string.
Link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
treehouser9
824 Points+= and += didn't work. What's the correct stuff to put in the blank space? Here's the Quiz Question again:
Consider the following code:
let greeting = 'Hi'; greeting = greeting + ', Treehouse students!'; Complete this code by adding the operator that produces the same result as the above code:
let greeting = 'Hi'; greeting ', Treehouse students!'; <----fill in blank space after greeting
Jose Jaimes
152 PointsJose Jaimes
152 PointsWhat is the question?