I currently have this JavaScript:
new_string = "<p>Problem name: <a href=\"http://www.problemio.com/problems/problem.php?problem_id=\" + problem_id + ">" + title + "</a></p>";
Where the title and problem_id are variables with a string and an id respectively.
How should I approach quotes when I have such situations as I am facing now?
Thanks!
You’ve just made a few mistakes with your quotation marks and slashes. It’s best to use both single and double quotes to keep track:
However, if you’d like to go the slash route: