Basic JavaScript - Escaping Literal Quotes in Strings

what’s wrong with this ?
var myStr = I am a "double quoted " string inside "double quotes". ;

First, don’t change const to var. Only do what the instructions ask and no more.

Second, you still need the double quotes wrapped around the entire string.

i had done this before but the result was showing the
same that’s why i changed but still showing same .

Can you share your current code again please? As @bbsmooth says, the entire string should be wrapped in double quotes, but you also need to escape any additional quote marks which are inside the string.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.