Hello experts i am trying to loop through an Array and showing it as an HTML in the body. I am using template literals for this. But when i use the <li>
tag inside template literals, it is not works. Can you check and let me know which is the correct method. Thanks in advance!. The code is as follows:
let uls = "<ul>";
for(i=0;i<a.length;i++){
`${uls+=a[i]}`;
}
let ulc = "</ul>";
let list = uls+=ulc;
document.write(list);