freeCodeCamp/curriculum/challenges/portuguese/02-javascript-algorithms-an.../basic-javascript/divide-one-number-by-anothe...

60 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: cf1111c1c11feddfaeb6bdef
title: Divide One Number by Another with JavaScript
challengeType: 1
videoUrl: ''
localeTitle: Divide um número por outro com JavaScript
---
## Description
<section id="description"> Nós também podemos dividir um número por outro. JavaScript usa o símbolo <code>/</code> para divisão. <p> <strong>Exemplo</strong> </p><blockquote> myVar = 16/2; // atribuído 8 </blockquote></section>
## Instructions
<section id="instructions"> Altere <code>0</code> para que o <code>quotient</code> seja igual a <code>2</code> . </section>
## Tests
<section id='tests'>
```yml
tests:
- text: Faça o <code>quotient</code> variável igual a 2.
testString: 'assert(quotient === 2, "Make the variable <code>quotient</code> equal to 2.");'
- text: Use o operador <code>/</code>
testString: 'assert(/\d+\s*\/\s*\d+/.test(code), "Use the <code>/</code> operator");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
var quotient = 66 / 0;
```
</div>
### After Test
<div id='js-teardown'>
```js
console.info('after the test');
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>