I have a JavaScript variable:
var text = "http://example.com"
Text can be multiple links. How can I put ” around the variable string?
I want the strings to, for example, look like this:
"'http://example.com'"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Whatever your text, to wrap it with
", you need to put them and escape inner ones with\. Above will result in: