The question is:
What is the JavaScript method to store a multiline string into a variable like you can in PHP?
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.
If by ‘multiline string’ you mean a string containing linebreaks, those can be written by escaping them using
\n(for newline):If you mean, how can a string be written across multiple lines of code, then you can continue the string by putting a
\backslash at the end of the line: