当前位置:网站首页>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
边栏推荐
- [batch change MySQL table and corresponding codes of fields in the table]
- How to sort the numbers with text in Excel from small to large instead of the first number
- C listens for WMI events
- [difference between Oracle and MySQL]
- 常用SQL语句总结
- 古代埃及希腊,数学用的什么进制
- Shell - introduction, variables, and basic syntax
- Using quartz under. Net core -- a simple trigger of [7] operation and trigger
- Understanding and small examples of unity3d object pool
- SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]
猜你喜欢

uni-app黑马优购项目学习记录(下)

Why do some people say SCM is simple and I have to learn it so hard?

Use of five routing guards

STM32 entry development board choose wildfire or punctual atom?

102. Sequence traversal of binary tree

编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)

MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】

SiteServer CMS5. 0 Usage Summary
Compare the performance of query based on the number of paging data that meet the query conditions

HCIP第五次实验
随机推荐
RPC核心概念理解
干货 | 快速抽取缩略图是怎么练成的?
Using quartz under. Net core -- operation transfer parameters of [3] operation and trigger
Manually implement call, apply and bind functions
How does matlab draw the curve of known formula and how does excel draw the function curve image?
Compare the performance of query based on the number of paging data that meet the query conditions
matlab如何绘制已知公式的曲线图,Excel怎么绘制函数曲线图像?
Some questions some questions some questions some questions
SystemVerilog(六)-变量
[simple understanding of database]
Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory
Seven cattle upload pictures (foreground JS + background C API get token)
For the space occupation of the software, please refer to the installation directory
MySQL advanced index [classification, performance analysis, use, design principles]
PC电脑使用无线网卡连接上手机热点,为什么不能上网
【Appium】通过设计关键字驱动文件来编写脚本
402. 移掉 K 位数字-贪心
2021 Great Wall Cup WP
209. 长度最小的子数组-滑动窗口
嵌入式系统中,FLASH中的程序代码必须搬到RAM中运行吗?