Hi there! The tests tell me to remove all the backslashes, but there arent any of them already! I even removed all the "<>".What did I do wrong?

Tell us what’s happening:

Your code so far


var myStr = 'a href="http:www.example.com" target="blank"Linka';

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 9; SM-A505FM) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36.

Challenge: Quoting Strings with Single Quotes

Link to the challenge:

Welcome, Julianna.

You are not supposed to remove the <>. I suggest you reset the code, and begin again.

1 Like

Thank you for the reply, Sky020, but I’ve reset the code a few times so its reply is " you should remove all the -s." hah)

Ok…you start with this code:

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

The instructions are:

Change the provided string to a string with single quotes at the beginning and end and no escape characters.

This is a single quote: '
This is a double quote: "
This is an escape character (also known as backslash): \

This is not an escape character: /

So, complete these steps:

  1. Remove the escape characters.
  2. Replace the first and last double quotes with single quotes.

Hope this helps

2 Likes

Thank you for such a detalied explanation, Sky020! It worked after I reset code and did the same things!