当前位置:网站首页>JS foundation -- Operator
JS foundation -- Operator
2022-06-11 09:38:00 【Snatch bamboo shoots 123】
Catalog
Arithmetic operator
A symbol that performs a series of operations
| Operator | describe |
|---|---|
| + | Add |
| - | Subtraction |
| * | Multiplication |
| / | division |
| % | modulus ( remainder ) |
| ++ | Self increasing |
| – | Self reduction |
Comparison operator
| Operator | describe |
|---|---|
| == | be equal to |
| === | Absolutely equal to ( Values and types are equal ) |
| != | It's not equal to |
| !== | Not absolutely equal to ( There is an inequality between value and type , Or two are not equal ) |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
Note the === and "!==", Both are js A special comparison operator in
Assignment operator
| Operator | describe |
|---|---|
| = | x=y |
| += | x+=y |
| -= | x-=y |
| *= | x*=y |
| /= | x/=y |
| %= | x%=y |
Logical operators
| Operator | describe |
|---|---|
| && | and |
| | | or |
| ! | not |
Conditional operator
A special ternary operator , The format is as follows
var num=a?b:c;
In the above sentence num The values of are as follows
n u m = { b , a by really c , a by false num= \begin{cases} b,a It's true \\ c,a For false \end{cases} num={ b,a by really c,a by false
An operator
| Operator | describe |
|---|---|
| & | And |
| | | or |
| ^ | Exclusive or |
| ~ | Not |
| << | Move left |
| >> | Move right |
| >>> | fill 0 Move right |
边栏推荐
- Thread theory
- keyboard entry.
- Where is it safer to open an account for soda ash futures? How much does it cost to buy at least one hand?
- Pulsar job Plaza | Tencent, Huawei cloud, shrimp skin, Zhong'an insurance, streamnational and other hot jobs
- Monotone stack
- 【软件】ERP体系价值最大化的十点技巧
- 剑指 Offer II 041. 滑动窗口的平均值
- POJ3250「Bad Hair Day」
- [image processing] spatial domain image enhancement
- Output image is bigger (1228800b) than maximum frame size specified in properties (1048576b)
猜你喜欢

Detailed explanation of the difference between construction method and method

keyboard entry.

Exclusive interview - dialogue on open source Zhai Jia: excellent open source projects should be seen by more people. I am honored to participate in them

Openstack explanation (22) -- neutron plug-in configuration

Package details

Redis source code analysis hash object (z\u hash)
![报错[DetectionNetwork(1)][warning]Network compiled for 6 shaves,maximum available 10,compiling for 5 s](/img/54/f42146ae649836fe7070ac90f2160e.png)
报错[DetectionNetwork(1)][warning]Network compiled for 6 shaves,maximum available 10,compiling for 5 s

Analysis of high frequency interview questions in massive data processing

报错Output image is bigger(1228800B) than maximum frame size specified in properties(1048576B)

Typescript -- preliminary study of variable declaration
随机推荐
Pytorch installation for getting started with deep learning
Shandong University project training (IV) -- wechat applet scans web QR code to realize web login
affair
1493. the longest subarray with all 1 after deleting an element
Comment l'entreprise planifie - t - elle la mise en oeuvre?
MSF adds back door to normal program
1493. 删掉一个元素以后全为 1 的最长子数组
js基础--Array对象
Use of MSF evaluation module
[image processing] spatial domain image enhancement
报错[error] input tesnor exceeds available data range [NeuralNetwork(3)] [error] Input tensor ‘0‘ (0)
document对象
Award winning survey streamnational sponsored 2022 Apache pulsar user questionnaire
Four data-driven behaviors of integral system
How to deal with these problems in the factory production process?
报错ModularNotFoundError: No module named ‘find_version’
Control statement if switch for while while break continue
Augmented reality experiment IV of Shandong University
Console you don't know
Don't use redis list to implement message queue. Stream is designed for queues