--- id: cf1391c1c11feddfaeb4bdef title: Create Decimal Numbers with JavaScript challengeType: 1 videoUrl: '' localeTitle: 使用JavaScript创建十进制数 --- ## Description
我们也可以在变量中存储十进制数。十进制数有时称为浮点数浮点数注意
并非所有实数都可以准确地以浮点表示。这可能导致舍入错误。 细节在这里
## Instructions
创建一个变量myDecimal并给它一个带小数部分的十进制值(例如5.7 )。
## Tests
```yml tests: - text: myDecimal应该是一个数字。 testString: 'assert(typeof myDecimal === "number", "myDecimal should be a number.");' - text: myDecimal应该有一个小数点 testString: 'assert(myDecimal % 1 != 0, "myDecimal should have a decimal point"); ' ```
## Challenge Seed
```js var ourDecimal = 5.7; // Only change code below this line ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```