I have a string like this:
"string1\tstring2\n\t\tstring3"
I want to print a string in JavaScript. what should I do?
You should use JSON.stringify()
JSON.stringify()
Example:
JSON.stringify(string1 string2 string3) //console: string1\tstring2\t\tstring3
You should use
JSON.stringify()
Example: