60 lines
1.2 KiB
Markdown
60 lines
1.2 KiB
Markdown
---
|
||
id: cf1111c1c11feddfaeb6bdef
|
||
title: Divide One Number by Another with JavaScript
|
||
challengeType: 1
|
||
videoUrl: ''
|
||
localeTitle: Divide un número por otro con JavaScript
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> También podemos dividir un número por otro. JavaScript usa el símbolo <code>/</code> para la división. <p> <strong>Ejemplo</strong> </p><blockquote> myVar = 16/2; // asignado 8 </blockquote></section>
|
||
|
||
## Instructions
|
||
<section id="instructions"> Cambia el <code>0</code> para que el <code>quotient</code> sea igual a <code>2</code> . </section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: Haz que el <code>quotient</code> variable sea igual a 2.
|
||
testString: 'assert(quotient === 2, "Make the variable <code>quotient</code> equal to 2.");'
|
||
- text: Usa el 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>
|