以前js拼接字符串有好多
使用“ ”将多行字符串拼接起来:
var roadPoem = 'Then took the other, as just as fair, ' + 'And having perhaps the better claim ' + 'Because it was grassy and wanted wear, ' + 'Though as for that the passing there ' + 'Had worn them really about the same, '
将多行字符串放在反引号``之间就好了:
var roadPoem = `Then took the other, as just as fair, And having perhaps the better claim Because it was grassy and wanted wear, Though as for that the passing there Had worn them really about the same,`