838 B
838 B
id | title | challengeType | videoUrl | forumTopicId | dashedName |
---|---|---|---|---|---|
cf1111c1c11feddfaeb6bdef | 除法运算 | 1 | https://scrimba.com/c/cqkbdAr | 17566 | divide-one-number-by-another-with-javascript |
--description--
我们可以在 JavaScript 中做除法运算。
JavaScript 中使用 /
符号做除法运算。
示例
myVar = 16 / 2;
现在,变量 myVar
的值为 8
。
--instructions--
改变数值 0
来让变量 quotient
的值等于 2
。
--hints--
要使 quotient
的值等于 2。
assert(quotient === 2);
使用 /
运算符。
assert(/\d+\s*\/\s*\d+/.test(code));
--seed--
--after-user-code--
(function(z){return 'quotient = '+z;})(quotient);
--seed-contents--
var quotient = 66 / 0;
--solutions--
var quotient = 66 / 33;