The escape character | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The escape character

i didn't get what is really used for i mean i understand that it turns the special characters to strings but also can be used for new line tab etc. when i tried it on the sololearns compiler it didnt work as new line and tab idk if its about the compiler or me

21st Apr 2017, 10:08 AM
uğur Demirel
uğur Demirel - avatar
4 Answers
+ 5
\t It worked well for prompt alert confirm box for document.write support for \",\',\\ and \(data character)
21st Apr 2017, 10:29 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 5
use document.write("<br>"+"\"I am the Flash or Batman?\".<br> Btw I pity wife of The Flash a lot"); <br> doesn't have any close tag
21st Apr 2017, 1:07 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
0
ok ty ^^
21st Apr 2017, 1:09 PM
uğur Demirel
uğur Demirel - avatar
- 1
so do i need to use </br> html tag to write the 'i am a javascript programmer' sentence to a new line ?
21st Apr 2017, 1:06 PM
uğur Demirel
uğur Demirel - avatar