60 lines
1.4 KiB
Markdown
60 lines
1.4 KiB
Markdown
---
|
||
id: bd7993c9c69feddfaeb7bdef
|
||
title: Multiply Two Decimals with JavaScript
|
||
challengeType: 1
|
||
videoUrl: ''
|
||
localeTitle: Умножить два десятичных знака с помощью JavaScript
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> В JavaScript вы также можете выполнять вычисления с десятичными числами, как и целые числа. Давайте умножим два десятичных знака вместе, чтобы получить их продукт. </section>
|
||
|
||
## Instructions
|
||
<section id="instructions"> Измените <code>0.0</code> чтобы продукт равнялся <code>5.0</code> . </section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
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");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
var product = 2.0 * 0.0;
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
### After Test
|
||
<div id='js-teardown'>
|
||
|
||
```js
|
||
console.info('after the test');
|
||
```
|
||
|
||
</div>
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|