Help me for example

Help me for example
0

#1

Tell us what’s happening:

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 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes


#2

You just needed to change one set of single quotes. Not all the double quotes. If that’s what you’re asking.


#3

Yes, you can’t have single quotes inside of single quotes or double quotes inside of double quotes (without using escaping).

So:

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

is illegal as is:

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

Those are forbidden. If you use one on the outside, you need to use the opposite on the inside.


#4

Another hint is that if you use a double quote ("), everything in between and the next double quote is a string. Same can be said for single quote (’).