1.1 KiB
Raw Blame History

id, title, challengeType, videoUrl, localeTitle
id title challengeType videoUrl localeTitle
bd7993c9c69feddfaeb7bdef Multiply Two Decimals with JavaScript 1 使用JavaScript乘以两个小数

Description

在JavaScript中您也可以使用十进制数执行计算就像整数一样。让我们将两位小数相乘得到它们的乘积。

Instructions

更改0.0使产品等于5.0

Tests

tests:
  - text: 变量<code>product</code>应该等于<code>5.0</code> 。
    testString: 'assert(product === 5.0, "The variable <code>product</code> should equal <code>5.0</code>.");'
  - text: 你应该使用<code>*</code>运算符
    testString: 'assert(/\*/.test(code), "You should use the <code>*</code> operator");'

Challenge Seed

var product = 2.0 * 0.0;

After Test

console.info('after the test');

Solution

// solution required