61 lines
1.0 KiB
Markdown
61 lines
1.0 KiB
Markdown
![]() |
---
|
|||
|
id: cf1231c1c11feddfaeb5bdef
|
|||
|
title: Множення двох чисел за допомогою JavaScript
|
|||
|
challengeType: 1
|
|||
|
videoUrl: 'https://scrimba.com/c/cP3y3Aq'
|
|||
|
forumTopicId: 18243
|
|||
|
dashedName: multiply-two-numbers-with-javascript
|
|||
|
---
|
|||
|
|
|||
|
# --description--
|
|||
|
|
|||
|
Ми також можемо множити одне число на інше.
|
|||
|
|
|||
|
JavaScript використовує символ `*` для множення двох чисел.
|
|||
|
|
|||
|
**Приклад**
|
|||
|
|
|||
|
```js
|
|||
|
const myVar = 13 * 13;
|
|||
|
```
|
|||
|
|
|||
|
`myVar` мало б значення `169`.
|
|||
|
|
|||
|
# --instructions--
|
|||
|
|
|||
|
Змініть `0` так, щоб добуток дорівнював `80`.
|
|||
|
|
|||
|
# --hints--
|
|||
|
|
|||
|
Змінна `product` повинна дорівнювати 80.
|
|||
|
|
|||
|
```js
|
|||
|
assert(product === 80);
|
|||
|
```
|
|||
|
|
|||
|
Ви маєте використати оператор `*`.
|
|||
|
|
|||
|
```js
|
|||
|
assert(/\*/.test(code));
|
|||
|
```
|
|||
|
|
|||
|
# --seed--
|
|||
|
|
|||
|
## --after-user-code--
|
|||
|
|
|||
|
```js
|
|||
|
(function(z){return 'product = '+z;})(product);
|
|||
|
```
|
|||
|
|
|||
|
## --seed-contents--
|
|||
|
|
|||
|
```js
|
|||
|
const product = 8 * 0;
|
|||
|
```
|
|||
|
|
|||
|
# --solutions--
|
|||
|
|
|||
|
```js
|
|||
|
const product = 8 * 10;
|
|||
|
```
|