\\
) 转义字符来转义字符串中的引号:
```js
// 一种引号的正确使用方式
const allSameQuotes = 'I\'ve had a perfectly wonderful evening, but this wasn\'t it.';
```
href
属性的值使用不同的引号,或者转义现有的引号。注意,整个字符串外面的双引号要保留。
href
的值 '#Home' 周围的引号。"
testString: assert(code.match(//g));
- text: 你应该在整个字符串外围保留双引号。
testString: assert(code.match(/".*?<\/p>";/g)); ```
Click here to return home
"; console.log(innerHtml); ```Click here to return home
"; console.log(innerHtml); ```