freeCodeCamp/curriculum/challenges/chinese/02-javascript-algorithms-an.../basic-javascript/divide-one-number-by-anothe...

41 lines
556 B
Markdown
Raw Normal View History

---
id: cf1111c1c11feddfaeb6bdef
title: 除法运算
challengeType: 1
videoUrl: 'https://scrimba.com/c/cqkbdAr'
forumTopicId: 17566
---
# --description--
我们可以在 JavaScript 中做除法运算。
JavaScript 中使用`/`符号做除法运算。
**示例**
```js
myVar = 16 / 2; // assigned 8
```
# --instructions--
改变数值`0`来让变量`quotient`的值等于`2`。
# --hints--
要使`quotient`的值等于 2。
```js
assert(quotient === 2);
```
使用`/`运算符。
```js
assert(/\d+\s*\/\s*\d+/.test(code));
```
# --solutions--