ES6 - Create Strings using Template Literals : backticks

Tell us what’s happening:
I don’t understand why I am not getting the desired output here.

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< arr.length;i++){
    failureItems[i]=`<li class="text-warning"> ${arr[i]}</li>`;
  // Only change code above this line

  return failureItems;

const failuresList = makeList(result.failure);

Challenge: ES6 - Create Strings using Template Literals

Link to the challenge:

You have an unnecessary space in your string.


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