Valeriy 79d9012432 fix(curriculum): quotes in tests (#18828)
* fix(curriculum): tests quotes

* fix(curriculum): fill seed-teardown

* fix(curriculum): fix tests and remove unneeded seed-teardown
2018-10-20 23:32:47 +05:30

1.1 KiB

id, title, challengeType
id title challengeType
bd7993c9c69feddfaeb7bdef Multiply Two Decimals with JavaScript 1

Description

In JavaScript, you can also perform calculations with decimal numbers, just like whole numbers. Let's multiply two decimals together to get their product.

Instructions

Change the 0.0 so that product will equal 5.0.

Tests

tests:
  - text: The variable <code>product</code> should equal <code>5.0</code>.
    testString: assert(product === 5.0, 'The variable <code>product</code> should equal <code>5.0</code>.');
  - text: You should use the <code>*</code> operator
    testString: assert(/\*/.test(code), 'You should use the <code>*</code> operator');

Challenge Seed

var product = 2.0 * 0.0;


After Test

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

Solution

var product = 2.0 * 2.5;