DEV Community

Discussion on: Escape Sequence in JavaScript - A Few Unused Ones as Well

Collapse
 
lionelrowe profile image
lionel-rowe

That's interesting, but I think that's referring to a different concept again. For example, "A" uses a character literal, but "\x41" doesn't (even though they are the same string). So in the case of escaping newlines, "\n" doesn't use a character literal, whereas

`
`
Enter fullscreen mode Exit fullscreen mode

does.

Thread Thread
 
manikbajaj profile image
Manik

Hmm I would agree to that looking at the logic! How about chnaging the title to escape characters and having a genral approach towads it rather than refering to a specific escape charater that generatds charater literals 👍

Thread Thread
 
lionelrowe profile image
lionel-rowe

Yes, personally I'd call them "escape sequences" (with \ being the "escape character").

Anyway, nice article! 😁

Thread Thread
 
manikbajaj profile image
Manik

Yes agreed 💯