当前位置:网站首页>js使用一元运算符简化字符串转数字
js使用一元运算符简化字符串转数字
2022-07-27 14:23:00 【讲礼貌】
使用一元运算符简化字符串转数字
//普通写法
let total = parseInt('13');
let average = parseFloat('12.7');
// 简写
let total = +'13';
let average = +'12.7';
边栏推荐
- Network equipment hard core technology insider router Chapter 16 dpdk and its prequel (I)
- TCC
- md 中超链接的解析问题:解析`this.$set()`,`$`前要加空格或转义符 `\`
- js寻找数组中的最大和最小值(Math.max()方法)
- [0 basic operations research] [super detail] column generation
- Network equipment hard core technology insider router 19 dpdk (IV)
- Lua study notes
- EMC design scheme of RS485 interface
- Unity3d learning note 10 - texture array
- 一文读懂鼠标滚轮事件(wheelEvent)
猜你喜欢

IJCAI 2022 outstanding papers were published, and 298 Chinese mainland authors won the first place in two items

generic paradigm

USB2.0接口的EMC设计方案

Design scheme of digital oscilloscope based on stm32

Pictures to be delivered

积分运算电路的设计方法详细介绍

Leetcode 74. search two-dimensional matrix bisection /medium

3.3-5v conversion

The design method of integral operation circuit is introduced in detail

HaoChen CAD building 2022 software installation package download and installation tutorial
随机推荐
2022-07-27 Daily: IJCAI 2022 outstanding papers were published, and 298 Chinese mainland authors won the first place in two items
泛型
STL value string learning
Leetcode 244 week competition - post competition supplementary question solution [broccoli players]
Network equipment hard core technology insider router Chapter 16 dpdk and its prequel (I)
ad7606与stm32连接电路介绍
一文读懂鼠标滚轮事件(wheelEvent)
4种单片机驱动继电器方案
What is the breakthrough point of digital transformation in the electronic manufacturing industry? Lean manufacturing is the key
Leetcode 240. search two-dimensional matrix II medium
Kubernetes CNI classification / operation mechanism
Reading notes of lifelong growth (I)
reflex
Unity performance optimization ----- drawcall
Record record record
Sword finger offer cut rope
反射
Transactions_ Basic demonstrations and transactions_ Default auto submit & manual submit
Spark Filter算子在Parquet文件上的下推
USB interface electromagnetic compatibility (EMC) solution