Double quote in JavaScript string

Use single quotes.

error += '<li> this is not the name "....." </li>\n';

Or escape the double quotes.

error += "<li> this is not the name \".....\" </li>\n";

Leave a Comment