However, those are not the instructions. There is literally NO mention anywhere of a carriage return. Here are the EXACT instructions:
" 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"
No carriage return. Where on earth is a carriage return in that set of instructions? What is going on?? Please help, I’m going nuts over this. Thanks
Thanks, but I’m really struggling as I think my code is ok. I’m reading this:
FirstLine and linebreak followed by tab SecondLine and linebreak followed by ThirdLine.
My code looks like this:
var myStr;
myStr=“FirstLine\n \t SecondLine \n ThirdLine”// Change this line
I have all the /n and the /t as specified in instructions. I don’t understand why it’s saying "SecondLine should be preceded by the backslash character " when the instructions say there should be a tab in front of it.
Please post your actual code instead of a screenshot. It is very hard to debug screenshots. A link to the challenge you are working on would also help.
I think you problem comes from the first failing test:
Hi I took out the spaces. Now it’s not happy if I add the \ before SecondLine (which makes no sense as they are asking for \t) and if I take out the \ the error asks for it again.
var myStr;
myStr="FirstLine\n\t\SecondLine\nThirdLine"// Change this line
I really appreciate you taking the time to answer me. I’ve hit a bit of a slump and am trying to work through some major frustration.
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.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.