# ES6--Create Strings using Template Literals

**URL:** <https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [March 1, 2019, 3:04am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008 "2019-03-01T03:04:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![InicianteGit1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/iniciantegit1/32/84771_2.png) [@InicianteGit1](https://forum.freecodecamp.org/u/InicianteGit1)\
**Post date:** [March 1, 2019, 3:04am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008/1 "2019-03-01T03:04:58Z")

</div>

Hello, I don’t understand what is the problem with my code.

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals)**
>
> Learn to Code — For Free

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”;

// change code below this line

const resultDisplayArray = arr.map(res =\>`&lt;li="text-warning"&gt;${res}&lt;/li&gt;`);

// change code above this line

return resultDisplayArray;

}

/\*\*

- makeList(result.failure) should return:

- [ `&lt;li class="text-warning"&gt;no-var&lt;/li&gt;`,

- `&lt;li class="text-warning"&gt;var-on-top&lt;/li&gt;`,

- `&lt;li class="text-warning"&gt;linebreak&lt;/li&gt;` ]

\*\*/

const resultDisplayArray = makeList(result.failure);

Any suggestions?

Thanks

---

<div class="post-metadata">

**Author:** ![Hrr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hrr/32/112406_2.png) [@Hrr](https://forum.freecodecamp.org/u/Hrr)\
**Post date:** [March 1, 2019, 3:16am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008/2 "2019-03-01T03:16:46Z")

</div>

Your code " `&lt;li="text-warning"&gt;${res}&lt;/li&gt;` " isn’t shown correctly

---

<div class="post-metadata">

**Author:** ![InicianteGit1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/iniciantegit1/32/84771_2.png) [@InicianteGit1](https://forum.freecodecamp.org/u/InicianteGit1)\
**Post date:** [March 1, 2019, 3:18am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008/3 "2019-03-01T03:18:00Z")

</div>

how do I show it correctly?

---

<div class="post-metadata">

**Author:** ![Hrr](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hrr/32/112406_2.png) [@Hrr](https://forum.freecodecamp.org/u/Hrr)\
**Post date:** [March 1, 2019, 3:23am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008/4 "2019-03-01T03:23:24Z")

</div>

when you click the ‘ask for help’ button your code is already shown and there is no need to copy paste it  
just add the text you want to have others know what the problem is inside **Tell us what’s happening:**

---

<div class="post-metadata">

**Author:** ![InicianteGit1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/iniciantegit1/32/84771_2.png) [@InicianteGit1](https://forum.freecodecamp.org/u/InicianteGit1)\
**Post date:** [March 1, 2019, 3:26am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008/5 "2019-03-01T03:26:44Z")

</div>

OK I will do that. Hopefully it will work. It seems that it is not displaying the desired output resultDisplayArray

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 2, 2021, 11:14am UTC](https://forum.freecodecamp.org/t/es6-create-strings-using-template-literals/262008/6 "2021-02-02T11:14:02Z")

</div>


