Files

57 lines
930 B
Markdown
Raw Permalink Normal View History

---
id: bd7993c9ca9feddfaeb7bdef
title: Dividir um decimal por outro com JavaScript
challengeType: 1
videoUrl: 'https://scrimba.com/c/cBZe9AW'
forumTopicId: 18255
dashedName: divide-one-decimal-by-another-with-javascript
---
# --description--
2021-07-09 21:23:54 -07:00
Agora vamos dividir um decimal por outro.
# --instructions--
2021-07-09 21:23:54 -07:00
Modifique `0.0` para que a variável `quotient` seja igual a `2.2`.
# --hints--
2021-07-09 21:23:54 -07:00
A variável `quotient` deve ser igual a `2.2`
```js
assert(quotient === 2.2);
```
2021-07-09 21:23:54 -07:00
Você deve usar o operador `/` para dividir 4.4 por 2
```js
assert(/4\.40*\s*\/\s*2\.*0*/.test(code));
```
2021-07-09 21:23:54 -07:00
A variável quotient deve ser atribuída apenas uma vez
```js
assert(code.match(/quotient/g).length === 1);
```
# --seed--
## --after-user-code--
```js
(function(y){return 'quotient = '+y;})(quotient);
```
## --seed-contents--
```js
const quotient = 0.0 / 2.0; // Change this line
```
# --solutions--
```js
const quotient = 4.4 / 2.0;
```