unterminated string literal

前端 未结 9 1347
轮回少年
轮回少年 2020-11-30 06:07

The following code:

var str= \"English Comprehension<\\/strong>
                    
                    
9条回答
  •  猫巷女王i
    2020-11-30 06:34

    If you want to maintain your data in one block of string, try:

    var str= "English Comprehension\n\
                    
    \n\
      \n\
    • Synonyms/Antonyms/Word Meaning (Vocabulary)
    • \n\
    • Complete the Sentence (Grammar)
    • \n\
    • Spot error/Correct sentence (Grammar/sentence construction)
    • \n\
    • Sentence Ordering (Comprehension skills)
    • \n\
    • Questions based on passage (Comprehension skills)
    • \n\
    \n\
    ";

    notice the \n\ at the end of each line.

提交回复
热议问题