1.1 KiB

id, title, challengeType, videoUrl, forumTopicId, localeTitle
id title challengeType videoUrl forumTopicId localeTitle
bd7993c9c69feddfaeb7bdef Multiply Two Decimals with JavaScript 1 https://scrimba.com/c/ce2GeHq 301173 两个小数相乘

Description

在 JavaScript 中,你也可以用小数进行计算,就像整数一样。 把两个小数相乘,并得到它们乘积。

Instructions

改变0.0的数值让变量product的值等于5.0

Tests

tests:
  - text: 变量<code>product</code>应该等于<code>5.0</code>。
    testString: assert(product === 5.0);
  - text: 要使用<code>*</code>运算符。
    testString: assert(/\*/.test(code));

Challenge Seed

var product = 2.0 * 0.0;


After Test

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

Solution

var product = 2.0 * 2.5;