当前位置:网站首页>JS auto increment and auto decrement (unary operator)
JS auto increment and auto decrement (unary operator)
2022-06-09 21:35:00 【qq_ forty-six million three hundred and two thousand two hundre】
Unary operator :
You can use + Number , take string -> number
let a = '123'
a = +a
console.log(a,typeof a) // 123 'number'
Self increasing :
let a = 1
console.log(a++) //1
console.log(`a=${a}`) //a=2
let a = 1
console.log(++a) //2
console.log(`a=${a}`) //a=2
let d = 20
d =d++
console.log(d) //20
Self reduction :
let a = 3
console.log(a--); // 3
console.log(a) // 2
let b = 3
console.log(--b); // 2
console.log(b); //2
边栏推荐
- Set up ngrok server, realize intranet penetration service, and realize online access from external network to internal network
- 多线程场景下使用 ArrayList 丢数据
- Design of spectrum analyzer based on nexys3 VHDL board
- Thread interrupt
- QT database application 21 data grouping export
- 服务器响应未加载静态资源
- The server responded that static resources were not loaded
- Analysis of 403 problems of Pro backstage sub administrator
- Dataframe merge
- The browser cannot open Baidu, and others can be opened normally
猜你喜欢

发电厂企业的关口表参数里的组合无功1和组合无功2的含义--抄表数采问题

Pychart always displays the collecting data solution after entering the debug mode

Design and Simulation of SD card reading and writing based on FPGA Verilog

Example: use C # Net to teach you how to develop wechat official account (19) -- use wechat payment to transfer to wechat fans' change accounts

快递单信息抽取【三】--五条标注数据提高准确率,仅需五条标注样本,快速完成快递单信息任务

QT database application 21 data grouping export

Configuration du serveur DHCP et de la connexion client

一种RS485串口接口电流传感器开合式卡扣互感器支持modbus总线通讯规约协议

The browser cannot open Baidu, and others can be opened normally

Database, looking at the operation training problem, I suddenly can't do it. Solve it
随机推荐
(I) apple has open source, but so what?
Gbase8s database select Clause 2
js 强制类型转换 和 隐式类型转换 和 Unicode编码
Scheduled backup of laravel 8 database
Binary search tree
mmdetection训练自己的COCO数据集及常见问题
Laravel8 use when search
swagger上的model和返回的数据字段不一致的问题
Unbutu configuring DHCP server and client connections
MFC connection database shows no data source name found and no default driver specified
[cf] 797 div3 D.Black and White Stripe
numpy中的ndarry排序
A consistent friend
Example: use C # Net to teach you how to develop wechat official account (19) -- use wechat payment to transfer to wechat fans' change accounts
Analysis of 403 problems of Pro backstage sub administrator
The highest monthly salary is 16K. After surviving the difficult times, we can finally usher in the dawn~
Mysql异常:The server time zone value‘XXX'解决
抽象类可以继承实体类吗?
用Odoo实现企业数字化转型有什么好的?
Why rewrite equals and hashcode?