Quotes in quotes

challenge string

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

My solution

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

The error message that I’m getting is that I need to remove all of the ‘’ s

The ‘’ is not the problem but I cannot see the error. The system often gives an incorrect error message when there is a problem. I’ve reread, watched the video, etc to no avail. Help please.

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Quoting Strings with Single Quotes

Link to the challenge:

Check the end of the line, try proper closing instead </a

maybe you missed something? hint: look at each of the elements (i.e. <a>...</a> and check if you missed closing it

Thanks guys I’m going over it and found one error but correcting it didn’t fix the issue.

Add ( _ ) before “blank”, like … “_blank”

Thanks, I found that one but it didn’t solve the problem. What did wasn’t the back slash the error message claimed, it was something that wasn’t in the video or the help screens a closing >. the video did it wrong too. Thanks for the help.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

Please use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.

markdown_Forums