在JavaScript中创建多行字符串

血红的双手。 提交于 2020-08-17 06:34:37

问题:

I have the following code in Ruby. 我在Ruby中有以下代码。 I want to convert this code into JavaScript. 我想将此代码转换为JavaScript。 what's the equivalent code in JS? JS中的等效代码是什么?

text = <<"HERE"
This
Is
A
Multiline
String
HERE

解决方案:

参考一: https://stackoom.com/question/3NRb/在JavaScript中创建多行字符串
参考二: https://oldbug.net/q/3NRb/Creating-multiline-strings-in-JavaScript
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!