Basic JavaScript: Escape Sequences in Strings..what's wrong

var myStr =“FirstLine\n\t\SecondeLine\nThirdLine”;// Change this line

// running tests

myStr should contain the strings FirstLine, SecondLine and ThirdLine (remember case sensitivity)

SecondLine should be preceded by the backslash character \

There should be a newline character between SecondLine and ThirdLine

// tests completed

Adding a backslash within a string is much like adding internal quotation marks. It needs to be escaped as well.

2 Likes

Also, this is not SecondLine

2 Likes

Thanks , it worked well