freeCodeCamp/guide/chinese/javascript/tutorials/perform-arithmetic-operatio.../index.md

9 lines
262 B
Markdown
Raw Normal View History

---
title: Perform Arithmetic Operations on Decimals with JavaScript
localeTitle: 使用JavaScript对小数执行算术运算
---
在JavaScript中您可以使用十进制数执行计算就像整数一样。
```
var quotient = 4.4 / 2.0; // equals 2.2
```