当前位置:网站首页>Arithmetic expression
Arithmetic expression
2022-04-23 17:41:00 【KK should continue to work hard】
Arithmetic expression
Arithmetic operator
- +: Both operators are numbers to add , The rest are hyphens
-
-
- /
- %
Implicit type conversion
If an operand involved in a mathematical operation is not of numeric type , This operand is automatically converted to numeric type ( The essence is to call... Internally Number Function converts the corresponding value to a numeric type )
of IEEE754
terms of settlement : When performing decimal operations , To call the number toFixed Method , Keep the specified number of decimal places
Negative numbers have no open root , So for NaN
Relationship expression
Relational operator : The result of relational operator operation is Boolean value
- <
-
=
- <=
- ==
- !==
- ===
- !=
Equality and congruence
- equal : Two equal signs do not compare the type of value , It compares the values after implicit conversion
- Congruence : The three equal signs compare not only the same value but also the same type
- null and undefined use == Compare ( Involving implicit cast ,ES5 The specification States )
If x by null,y by undefined, The result is true; If x by null,y by undefined, The result is true - null and undefined use === When comparing, the result is false Because of different types
typeof null //object
typeof undefined //undefined
NaN==NaN //false
NaN===NaN //false
How to judge whether it is NaN:isNaN()
Logical expression
Logical operators
- !
- &&
- ||
Short circuit calculation
a&&b Operation :a really , The value of the expression is b;a false , The value of the expression is a
a||b Operation :a really , The value of the expression is a;a false , The value of the expression is b
Logical operation sequence : Not ---- And ---- or
Assignment expression
Assignment operator
- =
- +=
- -=
- *=
- /=
- %=
- ++
- –
Synthetic expression
The order of operations : Non operation ---- Mathematical operations ---- Relationship between operation ---- Logical operations
The range of variables represents
// 5<=a<=12
if(a>=5&&a<=12){
}
版权声明
本文为[KK should continue to work hard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230551363466.html
边栏推荐
- 超分之TDAN
- Clickhouse - data type
- 1217_ Generating target files using scons
- MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】
- stm32入门开发板选野火还是正点原子呢?
- 2021 Great Wall Cup WP
- MySQL installation
- How does matlab draw the curve of known formula and how does excel draw the function curve image?
- 386. Dictionary order (medium) - iteration - full arrangement
- 编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)
猜你喜欢
Collection of common SQL statements
MySQL进阶之索引【分类,性能分析,使用,设计原则】
Dry goods | how to extract thumbnails quickly?
编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)
Halo open source project learning (II): entity classes and data tables
Qt 修改UI没有生效
MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
JVM class loading mechanism
Understanding of RPC core concepts
随机推荐
超分之TDAN
If you start from zero according to the frame
Double pointer advanced -- leetcode title -- container with the most water
Compare the performance of query based on the number of paging data that meet the query conditions
41. The first missing positive number
Use of Shell sort command
Sword finger offer 03 Duplicate number in array
EasymodbusTCP之clientexample解析
Oninput one function to control multiple oninputs (take the contents of this input box as parameters) [very practical, very practical]
剑指 Offer 22. 链表中倒数第k个节点-快慢指针
48. Rotate image
Hcip fifth experiment
Kubernetes service discovery monitoring endpoints
Summary of common SQL statements
Using quartz under. Net core -- a simple trigger of [7] operation and trigger
Where is the configuration file of tidb server?
92. Reverse linked list II byte skipping high frequency question
node中,如何手动实现触发垃圾回收机制
Excel quickly and automatically fills the contents of a row on a blank cell
239. 滑动窗口最大值(困难)-单向队列、大顶堆-字节跳动高频题