In my code output <li> element part is not visible in the console output,
i try it on my local js file, the output i got has <li> part in the array,
but in freeCodeCamp console i get the output :
//Output in freeCodeCamp Console :
['no-var','var-on-top','linebreak']
// Expected Output :
[
'<li class="text-warning">no-var</li>',
'<li class="text-warning">var-on-top</li>',
'<li class="text-warning">linebreak</li>'
]
My code :
const failureItems = [];
for(let i=0; i<arr.length; i++){
failureItems[i] = `<li class="target-warning">${arr[i]}</li>`;
}
I tried using 2 ways to get the ouput , first the template literal along the string part, and , storing <li> element part in varible and using template literal, both have output where <li> part string is missing.
Also, While writing this post , i noticed <li> part is not visible unless , i use code format in the editor, i also tried JSON.stringify() in the code , still got same result, may be there is html element filtering , idk
Also , while writing this i found , what is happening here , as you can see 2nd screenshot , there are <li> part missing , so i used < and >
Here is changed code :
failureItems[i] = <li > class="text-warning">${arr[i]}</li>
Which i get output as :
Note : In the Above code , i by mistake use class"target-warning" instead class="text-warning" , i changed that , But , still i am getting error in the code.
Thank you



