because string need to be written within quote.
"Sally is a "Angry bird" from a desert."
JavaScript will misunderstand this string that The string will be chopped to "Sally is a".
To keep all the words, we need put some backslash in it.:
let text = "Sally is a \"Angry bird\" from a desert."
more common example:
let htmlTemplate = "Sally is a \"Angry bird\" from a desert.
"
留言
張貼留言