goodStr = 'Jake asks Finn, "Hey, let\'s go on an adventure?"';
badStr = 'Finn responds, "Let's go!"'; // Throws an error
Hello folks!
With reference to the code above, i understand that backslash \ tells the code to ignore the quote mark ’ and not to end the string. But i’m unsure why on the badStr you couldn’t have but a backslash in front of the ’ in ‘let’s’. i.e:
badStr = 'Finn responds, "Let\'s go!"';
Would this throw an error?
Thanks
Matt