freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../debugging/catch-mixed-usage-of-single.../index.md

15 lines
514 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Catch Mixed Usage of Single and Double Quotes
---
## Catch Mixed Usage of Single and Double Quotes
- Remember whether you choose to use single or double quotes, simply adding a `\` before the character will allow the character to fit in the string without closing either single or double quotes.
- The test cases will only be passed by using double quotes.
## Solution:
```javascript
//Solution1:
let innerHtml = "<p>Click here to <a href=\"#Home\">return home</a></p>";
console.log(innerHtml);
```