[Typescript] Improve Readability with TypeScript Numeric Separators when working with Large Numbers(
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Typescript] Improve Readability with TypeScript Numeric Separators when working with Large Numbers(相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/color' title='color'>color
type write esc nbsp rip form when makeWhen looking at large numbers in code (such as 1800000) it’s oftentimes difficult for the human eye to quickly see how big the number actually is. TypeScript allows us to use numeric separators to write numbers in a more human readable format (such as 1_800_000), while keeping the generated javascript unchanged.
Since Typescript 1.7, we are able to do:
const num: number = 123_456_789; // the same as 123456789
There is no limit how you add _ to the number, just make it reasonable.
以上是关于[Typescript] Improve Readability with TypeScript Numeric Separators when working with Large Numbers(的主要内容,如果未能解决你的问题,请参考以下文章
smaller programs should improve performance
How To Improve Deep Learning Performance
Improve Score Better With 200-155 Exam Cram
Improve Score Better With 300-320 Exam Cram
[Javascript] Improve Composition with the Compose Combinator