Usually use string or [].join('')
A colleague recommended this format
ExceptionDivHtml="<div class='gameItems'>\ <div class='kreds_top_L'>\ <span style='padding:0 10px;'><b>Current Balance:</b><font> </font> Credits</span>\ </div>\ </div>";
I found that it is supported in the browser, and the related writing method is also very simple.
There is a problem, that is, when the string is compressed, the preceding spaces are also in the string, so it will not be compressed.
So in projects that do not require compression, or if the compression requirements are not so strict, you can indeed use the above method, and the code will look more structured and simple
The above is the entire content of this article, I hope you all like it.