How to print a string in raw format (including all LINUX string representations like \t and \n) in JavaScript?
P粉009186469
P粉009186469 2024-02-17 20:56:09
0
1
394

I have a string like this:

"string1\tstring2\n\t\tstring3"

I want to print a string in JavaScript. what should I do?

P粉009186469
P粉009186469

reply all(1)
P粉715274052

You should use JSON.stringify()

Example:

JSON.stringify(string1  string2     string3)

//console: string1\tstring2\t\tstring3
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template