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

1.2 KiB

id title challengeType videoUrl localeTitle
cf1111c1c11feddfaeb6bdef Divide One Number by Another with JavaScript 1 Divide um número por outro com JavaScript

Description

Nós também podemos dividir um número por outro. JavaScript usa o símbolo / para divisão.

Exemplo

myVar = 16/2; // atribuído 8

Instructions

Altere 0 para que o quotient seja igual a 2 .

Tests

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");'

Challenge Seed

var quotient = 66 / 0;

After Test

console.info('after the test');

Solution

// solution required