How to abbreviate multiline strings by JavaScript
Editor to share with you how to abbreviate JavaScript multi-line string, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Multiline string
If you need to write multiple lines of strings in your code, like this:
Const lorem = 'Lorem ipsum dolor sit amet, consectetur\ n\ t' + 'adipisicing elit, sed do eiusmod tempor incididunt\ n\ t' +'ut labore et dolore magna aliqua. Ut enim ad minim\ n\ t'+ 'veniam, quis nostrud exercitation ullamco laboris\ n\ t' + 'nisi ut aliquip ex ea commodo consequat. Duis aute\ n\ t' + 'irure dolor in reprehenderit in voluptate velit esse.\ n\ t'
But there is an easier way to use only quotation marks:
Const lorem = `Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.` above is all the content of the article "how to abbreviate multiline strings in JavaScript". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!