Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Escape character
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===JavaScript === JavaScript uses the {{code|\}} (backslash) as an escape character for:<ref>{{cite web|url=http://mathiasbynens.be/notes/javascript-escapes |title=JavaScript character escape sequences |publisher=Mathias Bynens |date=21 December 2011 |access-date=2014-06-30}}</ref><ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/2yfce773%28v=vs.94%29.aspx |title=Special Characters (JavaScript) |publisher=Microsoft Developer Network |access-date=2014-06-30 |url-status=live |archive-url=https://web.archive.org/web/20141214014640/http://msdn.microsoft.com/en-us/library/2yfce773(v=vs.94).aspx |archive-date= Dec 14, 2014 }}</ref> * {{code|\'}} single quote * {{code|\"}} double quote * {{code|\\}} backslash * {{code|\n}} [[newline|new line]] * {{code|\r}} [[carriage return]] * {{code|\t}} tab * {{code|\b}} backspace * {{code|\f}} [[form feed]] * {{code|\v}} [[vertical tab]] ([[Internet Explorer 9]] and older treats {{code|'\v}} as {{code|'v}} instead of a vertical tab ({{code|'\x0B}}). If cross-browser compatibility is a concern, use {{code|\x0B}} instead of {{code|\v}}.) * {{code|\0}} [[null character]] ({{unichar|0}}) (only if the next character is not a decimal digit; else it is an octal escape sequence) * {{code|\xFF}} character represented by the hexadecimal byte <code>FF</code> The {{code|\v}} and {{code|\0}} escapes are not allowed in JSON strings. Example code:<syntaxhighlight lang="javascript"> console.log("Using \\n \nWill shift the characters after \\n one row down") console.log("Using \\t \twill shift the characters after \\t one tab length to the right") console.log("Using \\r \rWill imitate a carriage return, which means shifting to the start of the row") // can be used to clear the screen on some terminals. Windows uses \r\n instead of \n alone </syntaxhighlight>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Escape character
(section)
Add topic