Basic JavaScript - Quoting Strings with Single Quotes

Tell us what’s happening:
When I run this code it keeps saying remove all backslashes! I don’t understand what’s wrong with it. I’ve tried so many different variations now ugh.

Your code so far

const myStr = '<a href="http:www.example.com" target="_blank">Link</a>';

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15

Challenge: Basic JavaScript - Quoting Strings with Single Quotes

Link to the challenge:

Original:

const myStr = "<a href=\"http://www.example.com\" target=\"_blank\">Link</a>";

You removed two forward slashes, which is confusing the tests

2 Likes

wow. you just saved me some serious frustration, thank you!