It keeps on telling me to remove the backslashes (\ ) even though there aren't any

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

const myStr = '<a href=/"" target=/"_blank/">Link</a>';

Your browser information:

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

Challenge: Quoting Strings with Single Quotes

Link to the challenge:

Granted, the error message is not quite describing the problem correctly. You have changed all of the back slashes before the double quotes to forward slashes. I don’t think this is what you were asked to do. You should do two things:

  • change the outer quotes to single quotes (this means change the quotes around the entire string from double to single quotes, which you have done).
  • remove the escape characters (the escape character is the backslash, you want to remove them)

Once you do the second bullet then it will pass.

Hey bruce,
thanks for your response. I don’t have any backslashes in my code.

Click the “Reset All Code” button to start fresh on this challenge and you will :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.