Can't solve this: Create Strings using Template Literals

Tell us what’s happening:

What do i need to learn in able to solve this one?

Your code so far

const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["id-blacklist", "no-dup-keys"]
function makeList(arr) {
"use strict";

// Only change code below this line
const resultDisplayArray = null;
//Use template literal syntax with backticks to display each entry of the result object's failure array.
//get each result of result and stores it in a variable
let a = ${result.success},

// Each entry should be wrapped inside an li element with the class attribute text-warning
var i = 0;
for (i = 0; i < 4; i++){
//and listed within the resultDisplayArray.
var resultDisplayArray (<li> + "text-warning" + a + </li>);

// Only change code above this line

return resultDisplayArray;

const resultDisplayArray = 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/84.0.4147.125 Safari/537.36.

Challenge: Create Strings using Template Literals

Link to the challenge:

For starters, gotta fix a typo…
let a = ${result.succes}

1 Like

the idea is also to use object literals which you’re not using, for example instead of string concatenation

"<li>text-warning" + a + "</li>"

you can use a template literal

1 Like

Remember, though, that text-warning is the class name of the list-item element, and part of the string, not a variable.

1 Like

you’re right, edited to reflect that :smiley:

I am also having this issue, does someone have any solution for this?

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Getting the sollution alone is not good u won’t learn anything from it :slight_smile:
Rather ask for a hint or help like i did in this example. also since we both have the same issue feel free to dm me about it and maybe we can figure it out together

Hey @KittyKora,

this appears to be related to your older topic:

Did you possibly forget that you had this topic?

I think you were already on the right path in the old topic.

We can merge these into one post for you, or remove the older one if you’d like.

Yes i totally forgot i had it
not to strange if u look at the date july 23 last year XD

That topic was created was 28 days ago.

1 Like

I already asked @miku86 for assist with this topic since i have no idea what to do about it