58 lines
781 B
Markdown
58 lines
781 B
Markdown
---
|
|
id: cf1231c1c11feddfaeb5bdef
|
|
title: Multiply Two Numbers with JavaScript
|
|
challengeType: 1
|
|
videoUrl: 'https://scrimba.com/c/cP3y3Aq'
|
|
forumTopicId: 18243
|
|
---
|
|
|
|
# --description--
|
|
|
|
We can also multiply one number by another.
|
|
|
|
JavaScript uses the `*` symbol for multiplication of two numbers.
|
|
|
|
**Example**
|
|
|
|
```js
|
|
myVar = 13 * 13; // assigned 169
|
|
```
|
|
|
|
# --instructions--
|
|
|
|
Change the `0` so that product will equal `80`.
|
|
|
|
# --hints--
|
|
|
|
The variable `product` should be equal to 80.
|
|
|
|
```js
|
|
assert(product === 80);
|
|
```
|
|
|
|
You should use the `*` operator.
|
|
|
|
```js
|
|
assert(/\*/.test(code));
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --after-user-code--
|
|
|
|
```js
|
|
(function(z){return 'product = '+z;})(product);
|
|
```
|
|
|
|
## --seed-contents--
|
|
|
|
```js
|
|
var product = 8 * 0;
|
|
```
|
|
|
|
# --solutions--
|
|
|
|
```js
|
|
var product = 8 * 10;
|
|
```
|