有没有可能在JavaScript的多行字符串中添加注释?
就像这样:
var string = 'START - \
This is part of my string\
\\ This should be escaped!\
-END ';
// string = 'START - This is part of my string - END';
谢谢
有没有可能在JavaScript的多行字符串中添加注释?
就像这样:
var string = 'START - \
This is part of my string\
\\ This should be escaped!\
-END ';
// string = 'START - This is part of my string - END';
谢谢
var string ='START - \
This is my string'+
// This should be escaped!
' - END';
// string = 'START - This is my string - END'
但这并不太好...
var s = "multi line" +
//" line" +
" string";
你尝试过类似这样的东西吗?
var string = 'This is part of your string';
string += 'This is second part of your string'; //Comment yout want to add
string += 'This is thirdpart of your string';