Two corrent answers in an MCQ

In this lecture on “How Do You Create a Newline in Strings and Escape Strings?” in the JavaScript certification, one of the questions are as follows:

How would you correctly include quotes within a string that is already wrapped in quotes?

Use single quotes inside double quotes.

Use the \ character before the quotes you want to include.

Use \n to break the string.

JavaScript doesn’t allow quotes inside other quotes.

Aren’t both the first two options correct? Now I know based strictly on the passage one should choose the second one but choosing the first option displays “Incorrect.” (screenshot attached) which gives the wrong impression. Should I submit a PR or leave it as is?

1 Like

the change is not straightforward, please open an issue

So you agree it’s a flaw, right?

yes, if you want to report it, please don’t open a PR, it’s not a typo, the solution needs to be discussed, open an issue instead

1 Like