Various meanings of JavaScript symbols

Source: Internet
Author: User

There are 32 computer symbols, which have different meanings in different programming scenarios. Next I will give a rough look at the functions of these symbols.
'~! @ # $ % ^ & * ()-_ = + [] {}\|;: '",. <> /? Token is the 32 halfwidth symbols (the fullwidth symbols are wider, which are Chinese characters and cannot be used in programming). These symbols are distributed from left to right on the keyboard.
'Reverse quotation marks★Programming has no special significance
~ Wave Number★Programming has no special significance
! When the exclamation mark is used for logical operations, the [non] means that, on the contrary, if the original is true, then adding the exclamation mark in front is false. If the original is false, then adding the exclamation mark in front is true.
@ Address Code has no special meaning during programming. It is usually used as an email. Example:
Ddh4@163.com
# The prefix of the 16-digit color value in the CSS. Example: # ff0000 is red
$ Dollar regular expression, representing the end of a line or the end of a string (text)
% Percentile: the remainder is also called the modulus. Example: 8% 3 fruit: 2
^ When a regular expression is inserted, it indicates the beginning of a line or the beginning of a string (text ).
& In logical operation, & represents the logic of [and] and. An & operator is used for bitwise operations.
* When performing arithmetic operations, multiply the number. Example: Count 1 = 8*5; fruit: 40.
(Left bracket expression. It is also a symbol used for Function Definition and calling. During calculation, the brackets are prioritized.
) To the right of the right brace expression. It is also a symbol used for Function Definition and calling.
-When you perform arithmetic operations, subtract the number. Example: Count 1 = 8-5; fruit: 3. Two minus signs. After the variable, it indicates auto-subtraction. Example: Count 1-if the original value is 9, the auto-increment is 8, and the next value is 7.
_ Hurry up character★Programming has no special significance
= The "Hurry up" character indicates the "Assign" value, that is, the character on the right is sent to the left. If it is equal to or equal to two equal signs. === When three equal signs are used for logical operations, they are equivalent (that is, they are completely equal, including values and types)
+ During arithmetic operations, add the "add" number. Example: Number 1 = 2 + 4; fruit: 6. The two plus signs indicate auto-increment after the variable. For example, if the number is 9, the auto-increment value is 10, and the number is 11 again.
[Left-side brackets represent the left side of the array's lower mark. Regular Expression, representing the left side of the character class
] The right-side field indicates the right side of the array's lower mark. Regular Expression, representing the right side of the character class
{Left margin code block start on the left
} Ends on the right side of the code block
\ When a backslash regular expression is used, it refers to the conversion of [meaning], which is not the original meaning, or to the original meaning. For example, \ D indicates a number.
| Or operator logic operation, | two operators, representing the "or" and logic. One | Operator Used for bitwise operation.
The end of each statement is usually added at the end of each line. Do not add the brackets after the function definition.
: When defining an object, the colon is separated by the [Key] and [value]. Note that when [value] is a string, double quotation marks or single quotation marks are required. Example: {name: "Wenguang"; Gender: "male "}
'Single quotes enclose two single quotes with a character [String], that is, text. If the [String] contains single quotes, you can use double quotation marks to add the \ escape character.
"Double quotation marks enclose the character [String] in two double quotation marks, that is, text. If the [String] contains double quotation marks, you can use single quotation marks to add the \ escape character.
, Separated by commas (,) and variable definitions
Members of the period object, including attributes and Methods
<Less than the number in logical operation, it means less. The tag start character in HTML. Example: <div>
> Greater than the number in logical operation. Indicates the tag terminator in HTML.
/When the slash is used for arithmetic operations, the division sign. Example: Count 1 = 6/3; Result: 2. If the slash (/) is used, it is a line comment.
? The logical judgment of the question mark operator. Example: Male? Pat the shoulder: Kiss
■ There are also three empty characters, namely "" space "," "Hop (also known as tabs), and" \ r "carriage return. In programming, these three symbols are sometimes used to separate them. Therefore, when you need to separate them, one symbol can be used, and multiple symbols can be equivalent to one. There is no difference between a space and a hop. When there are many carriage returns, there is no difference between them and the first two. It is not possible to wrap a line when you cannot change the line.
■ Symbol combination
/* Block comment */multiple lines are allowed
<= Logical operation, small, equal to or less
> = In logical operation, the value is equal to or greater
20130803 http://ria4.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.