Template literals help?

I’ve been watching this video about higher order functions: https://www.youtube.com/watch?v=rRgD1yVwIvE&list=PLRIUpQubDGK2vWvVM7qQ24zkmynoet6f7&index=20&t=0s
and coding along, but at around 19 mins when the teacher starts writing template literals, my code has the squiggly line underneath some of it, like below:

Is there something wrong with what I wrote? It matches the code in the video though…


I think you have more backsticks than needed. There should be only two.


You are right! Sorry for the silly mistake… :grimacing:

Your return statement should be modified as such:

return `${company.name} [${company.start} - ${company.end}`;

The issue with the code you presented was that you end the template literal early, at `${company.name}`

1 Like

Thank you so much, I see it now.