JavaScript Template Literals

My code results to the specified (required) output except that the specified output has a line break on the first and last line, and mine doesn’t. I tried using “\n” and it doesn’t work so I resorted to the solution for this problem. But when I tried the solution, which is almost the same as mine, it still doesn’t work.

  **Your code so far**

const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["no-extra-semi", "no-dup-keys"]
function makeList(arr) {
// Only change code below this line
const failureItems = [];
  for (let i = 0; i < 3; i++) {
    `<li class="textwarning>${arr[i]}</li>`)
// Only change code above this line

return failureItems;

const failuresList = makeList(result.failure);

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36

Challenge: Create Strings using Template Literals

Link to the challenge:

Hi @Octane !

Welcome to the forum!

You have two issues.

They both have to deal with this word.
Look at the correct output again and you will see two things missing.

Hope that helps!

1 Like

First of all, that was so fast! Second, I saw my mistake already and I passed the test. Thank you so much for that quick response.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.