+ 1
Need examples of using special characters in the string - javascript
In JS, can you give an example of using \r \b \f and \\ inside a text string; or write a line for these special characters please. "I\'m a js learner."
2 odpowiedzi
+ 2
\r is carriage return use on Windows pc for display new carriage return line, it normally works together with \n. e.g. \r\n
\b is backspace, not really useful for displaying in string, however in regex, \b means word boundary.
\f is form feed, normally use in printing for advancing to new printing page.
\\ for displaying '\' character.
0
arh... thanks so much for your explanation, will try it in the pc...