// This is an integer constant
55
// Here is a floating-point constant
75.2
// Here is a string constant
"This is a test"
// This is an integer constant in hexadecimal (leading 0x)
0x1F
// This is an integer constant in octal (leading 0)
010
|
Escape Character
|
Meaning
|
"^a"
|
Bell (alert)
|
"^b"
|
Backspace
|
"^f"
|
Form feed
|
"^n"
|
New line
|
"^r"
|
Carriage return
|
"^t"
|
Tab
|
"^’"
|
Single quote
|
"^""
|
Double quote
|
"^^"
|
A single caret character
|