当前位置:网站首页>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
边栏推荐
- MySQL advanced index [classification, performance analysis, use, design principles]
- 一些问题一些问题一些问题一些问题
- 为什么有些人说单片机简单,我学起来这么吃力?
- 2. Electron's HelloWorld
- Use of Shell sort command
- 92. 反转链表 II-字节跳动高频题
- XTask与Kotlin Coroutine的使用对比
- matlab如何绘制已知公式的曲线图,Excel怎么绘制函数曲线图像?
- Websocket (basic)
- flink 学习(十二)Allowed Lateness和 Side Output
猜你喜欢

SiteServer CMS5. 0 Usage Summary

flink 学习(十二)Allowed Lateness和 Side Output
![Using quartz under. Net core -- operation transfer parameters of [3] operation and trigger](/img/4e/2161fc448f4af71d9b73b7de64a17f.png)
Using quartz under. Net core -- operation transfer parameters of [3] operation and trigger
![SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]](/img/60/e4d47d458dd98a0c6ba51874e07c30.png)
SQL optimization for advanced learning of MySQL [insert, primary key, sort, group, page, count]

索引:手把手教你索引从零基础到精通使用

Allowed latency and side output

Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory

ASP. Net core JWT certification

SystemVerilog(六)-变量

Perception of linear algebra 2
随机推荐
92. 反转链表 II-字节跳动高频题
Index: teach you index from zero basis to proficient use
[二叉数] 二叉树的最大深度+N叉树的最大深度
为什么有些人说单片机简单,我学起来这么吃力?
Add drag and drop function to El dialog
2.Electron之HelloWorld
编译原理 求first集 follow集 select集预测分析表 判断符号串是否符合文法定义(有源码!!!)
440. 字典序的第K小数字(困难)-字典树-数节点-字节跳动高频题
Using quartz under. Net core -- a simple trigger of [7] operation and trigger
Learning record of uni app dark horse yougou project (Part 2)
Using quartz under. Net core -- general properties and priority of triggers for [5] jobs and triggers
练习:求偶数和、阈值分割和求差( list 对象的两个基础小题)
01-初识sketch-sketch优势
Commonly used functions -- spineros:: and spineros::)
Future 用法详解
Some questions some questions some questions some questions
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
C语言程序设计之函数的构造
2021长城杯WP
[batch change MySQL table and corresponding codes of fields in the table]