2020-10-06 23:10:08 +05:30

1.1 KiB

id, challengeType, videoUrl, forumTopicId, localeTitle
id challengeType videoUrl forumTopicId localeTitle
cf1111c1c11feddfaeb6bdef 1 https://scrimba.com/c/cqkbdAr 17566 除法运算

Description

我们可以在 JavaScript 中做除法运算。 JavaScript 中使用/符号做除法运算。

示例

myVar = 16 / 2; // assigned 8

Instructions

改变数值0来让变量quotient的值等于2

Tests

tests:
  - text: 要使<code>quotient</code>的值等于 2。
    testString: assert(quotient === 2);
  - text: 使用<code>/</code>运算符。
    testString: assert(/\d+\s*\/\s*\d+/.test(code));

Challenge Seed

var quotient = 66 / 0;


After Test

(function(z){return 'quotient = '+z;})(quotient);

Solution

var quotient = 66 / 33;