This exercise baffled me. it want me to create an escape sequence in string so I did \myVar\n\r, myVar\r, and myVar\n. I still have syntax errors. Can you help m e out. Thank you
Thirdline is misspelled! It should be
ThirdLine (note uppercase
Well see the issue with testing is that it’s case sensitive.
(tests can be written to be case insensitive in general, but they don’t seem to be)
This test works fine - I passed it on Sunday
Ahhhh I hate stupid things like that
Assign the following three lines of text into the single variable myStr using escape sequences.
var myStr = FirstLine\n\SecondLine\r\ThirdLine\; ?
var myStr = FirstLine\n\SecondLine\r\ThirdLine; ?
You need to escape the backslashes to, so not
Syntax Error said Unexpected ‘’ and missing semicolon. I looked at this code below and I don’t understand why it’s not working.
var myStr = FirstLine\n\Second Line\r\ThirdLine;
I did typed var myStr = FirstLine newline backslash SecondLine carriage return backslash ThirdLine. I tried to post this code but it doesn’t reflect what I’m trying to do.
You have a \ following by nothing
The first backslash only says ‘comment out the next character’ - to comment out a backslash you need to use
I got it! Thank you for helping out!