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

1.4 KiB
Raw Blame History

id title challengeType videoUrl localeTitle
cf1111c1c11feddfaeb6bdef Divide One Number by Another with JavaScript 1 Разделите одно число другим с помощью JavaScript

Description

Мы также можем разделить одно число на другое. JavaScript использует символ / для деления.

пример

myVar = 16/2; // присвоено 8

Instructions

Измените значение 0 так, чтобы quotient был равен 2 .

Tests

tests:
  - text: Сделайте переменное <code>quotient</code> равным 2.
    testString: 'assert(quotient === 2, "Make the variable <code>quotient</code> equal to 2.");'
  - text: Используйте оператор <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