2020-09-29 22:09:05 +02:00

1.1 KiB

id, title, challengeType, videoUrl, forumTopicId, localeTitle
id title challengeType videoUrl forumTopicId localeTitle
cf1231c1c11feddfaeb5bdef Multiply Two Numbers with JavaScript 1 https://scrimba.com/c/cP3y3Aq 18243 乘法运算

Description

我们也可在 JavaScript 中使用乘法运算。 JavaScript 使用*符号表示两数相乘。

示例

myVar = 13 * 13; // assigned 169

Instructions

改变数值0来让变量 product 的值等于80

Tests

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

Challenge Seed

var product = 8 * 0;


After Test

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

Solution

var product = 8 * 10;