mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-31 06:01:50 -05:00
* fix: Chinese test suite Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working. * fix: ran script, updated testStrings and solutions
1.3 KiB
1.3 KiB
id, title, challengeType, videoUrl, localeTitle
| id | title | challengeType | videoUrl | localeTitle |
|---|---|---|---|---|
| cf1391c1c11feddfaeb4bdef | Create Decimal Numbers with JavaScript | 1 | 使用JavaScript创建十进制数 |
Description
并非所有实数都可以准确地以浮点表示。这可能导致舍入错误。 细节在这里 。
Instructions
myDecimal并给它一个带小数部分的十进制值(例如5.7 )。 Tests
tests:
- text: <code>myDecimal</code>应该是一个数字。
testString: assert(typeof myDecimal === "number");
- text: <code>myDecimal</code>应该有一个小数点
testString: assert(myDecimal % 1 != 0);
Challenge Seed
var ourDecimal = 5.7;
// Only change code below this line
After Test
console.info('after the test');
Solution
// solution required