当前位置:网站首页>js使用一元运算符简化字符串转数字
js使用一元运算符简化字符串转数字
2022-07-27 14:23:00 【讲礼貌】
使用一元运算符简化字符串转数字
//普通写法
let total = parseInt('13');
let average = parseFloat('12.7');
// 简写
let total = +'13';
let average = +'12.7';
边栏推荐
- “router-link”各种属性解释
- Lua study notes
- Four kinds of relay schemes driven by single chip microcomputer
- Network equipment hard core technology insider router Chapter 10 Cisco asr9900 disassembly (III)
- Unity's simplest object pool implementation
- 西瓜书《机器学习》阅读笔记之第一章绪论
- Introduction of the connecting circuit between ad7606 and stm32
- 《剑指Offer》 合并两个排序的链表
- STM32 CAN 通信 滤波设置问题
- 初探STM32掉电复位PDR
猜你喜欢

reflex

Singles cup, web:web check in

谷粒商城配置CorsWebFilter后,报错:Resource sharing error:MultipleAllowOriginValues
USB接口电磁兼容(EMC)解决方案

Basic usage of kotlin

Watermelon book machine learning reading notes Chapter 1 Introduction

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

Unity performance optimization ----- LOD (level of detail) of rendering optimization (GPU)

MySQL interview 40 consecutive questions, interviewer, if you continue to ask, I will turn my face

3.3-5v conversion
随机推荐
学习Parquet文件格式
光电隔离电路设计方案(六款基于光耦、AD210AN的光电隔离电路图)
Method of removing top navigation bar in Huawei Hongmeng simulator
/dev/loop1占用100%问题
Leetcode 244 week competition - post competition supplementary question solution [broccoli players]
华云数据打造完善的信创人才培养体系 助力信创产业高质量发展
MOS管防止电源反接的原理
Four kinds of relay schemes driven by single chip microcomputer
md 中超链接的解析问题:解析`this.$set()`,`$`前要加空格或转义符 `\`
Pictures to be delivered
Code coverage statistical artifact -jacobo tool practice
4种单片机驱动继电器方案
Principle of MOS tube to prevent reverse connection of power supply
3.3-5v conversion
Unity性能优化------DrawCall
Huayun data creates a perfect information technology and innovation talent training system to help the high-quality development of information technology and innovation industry
TCC
Simple mathematical knowledge related to 3D
EMC design scheme of CAN bus
Problem solving in magic tower project