* 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.1 KiB
1.1 KiB
id, title, challengeType, videoUrl, localeTitle
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
cf1111c1c11feddfaeb3bdef | Add Two Numbers with JavaScript | 1 | 使用JavaScript添加两个数字 |
Description
Number
是JavaScript中的数据类型,表示数字数据。现在让我们尝试使用JavaScript添加两个数字。当放置在两个数字之间时,JavaScript使用+
符号作为加法运算。 例 myVar = 5 + 10; //分配15
Instructions
0
使总和等于20
。 Tests
tests:
- text: <code>sum</code>应该等于<code>20</code>
testString: assert(sum === 20);
- text: 使用<code>+</code>运算符
testString: assert(/\+/.test(code));
Challenge Seed
var sum = 10 + 0;
After Test
console.info('after the test');
Solution
// solution required