What are the alternatives to js loop stitching strings?

such as product list

<li>
    <img src="../../tu.png"/>
    <div>:12</div>
</li>

when I used to write in jquery, I stitched the li into a string, then looped through an array of pictures, and looped together the li string. Finally, append the looped li string into the ul of the page.
is there any better way to replace this kind of circular stitching string? once the structure in li becomes complex, circular stitching string will be very painful. I think h5 has a new template tag, but when I looped through the image array append template, I found that in the end, only one li could be append.

May.29,2021

choose a js template engine with complex structure
for example: https://aui.github.io/art-tem.


these operations are stitched together using templates.

recommend juicer template engine produced by Ali.

https://github.com/PaulGuo/Ju.


if you are using es6, consider using template strings. If it is not es6, consider using a template engine.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31b43-2bd9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31b43-2bd9a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?