60 lines
1.1 KiB
Markdown
Raw Normal View History

---
id: cf1111c1c11feddfaeb3bdef
title: Add Two Numbers with JavaScript
challengeType: 1
videoUrl: ''
localeTitle: 使用JavaScript添加两个数字
---
## Description
<section id="description"> <code>Number</code>是JavaScript中的数据类型表示数字数据。现在让我们尝试使用JavaScript添加两个数字。当放置在两个数字之间时JavaScript使用<code>+</code>符号作为加法运算。 <strong></strong> <blockquote> myVar = 5 + 10; //分配15 </blockquote></section>
## Instructions
<section id="instructions">更改<code>0</code>使总和等于<code>20</code></section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>sum</code>应该等于<code>20</code>
testString: assert(sum === 20);
- text: 使用<code>+</code>运算符
testString: assert(/\+/.test(code));
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
var sum = 10 + 0;
```
</div>
### After Test
<div id='js-teardown'>
```js
console.info('after the test');
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>