InhaxD
1
Tell us what’s happening:
Describe your issue in detail here.
Your code so far
const myStr = "FirstLine\n\\SecondLine\\\n\rThirdLine\n\t"; // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Escape Sequences in Strings
Link to the challenge:
Please Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
What’s going on here?
InhaxD
3
Meu codigo = const myStr = “FirstLine\n\SecondLine\\n\rThirdLine\n\t”;
Eu estou tentando realizar o exercício, porem esta dando o mesmo erro não importa quantas vezes eu reveja.
Pode ser um bug?
Erro = // running tests There should be a newline character between
SecondLine
and
ThirdLine
myStr
should only contain characters shown in the instructions // tests completed
Yes, you wrote a bug in your solution.
The result must exactly match this, with zero extra or moved parts.
FirstLine
\SecondLine
ThirdLine
So
- The phrase “FirstLine” on one line
- A tab, a backslash, and the phrase “SecondLine” on the next line
- The phrase “ThirdLine” on the next line
Don’t add anything other than that!
InhaxD
5
Fiz exatamente isso, mas o exercício dá erro, não consigo ir para o próximo exercício!
The last code you posted did not do that. If you have new code, please post it.
InhaxD
7
const myStr = "FirstLine\n\\SecondLine\\\n\rThirdLine\n\t";
esse código está com 5 dos 7 critérios corretos, se deixar exatamente como você recomendou eu consigo apenas 4 de 7
-
where is the tab on the second line?
-
why is there an extra backslash at the end of the second line?
-
why is there a newline and a carriage return after the second line?
-
why is there a newline and tab after the third line?
The tests will only pass if you have exactly these things and nothing else:
InhaxD
9
const myStr = “FirstLine \n \SecondLine\ \rThirsLine”; // Change this line
// running tests
myStr
should not contain any spaces
myStr
should contain the strings
FirstLine
,
SecondLine
and
ThirdLine
(remember case sensitivity)
FirstLine
should be followed by the newline character
\n
myStr
should contain a tab character
\t
which follows a newline character
SecondLine
should be preceded by the backslash character
\
There should be a newline character between
SecondLine
and
ThirdLine
myStr
should only contain characters shown in the instructions // tests completed
system
Closed
11
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.