Randell Dawson 05f73ca409 fix(curriculum): Convert blockquote elements to triple backtick syntax for JavaScript Algorithms and Data Structures (#35992)
* fix: convert js algorithms and data structures

* fix: revert some blocks back to blockquote

* fix: reverted comparison code block to blockquotes

* fix: change js to json

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: convert various section to triple backticks

* fix: Make the formatting consistent for comparisons
2019-05-17 08:20:30 -05:00

1.2 KiB

id, title, challengeType, videoUrl
id title challengeType videoUrl
cf1111c1c11feddfaeb6bdef Divide One Number by Another with JavaScript 1 https://scrimba.com/c/cqkbdAr

Description

We can also divide one number by another. JavaScript uses the / symbol for division.

Example

myVar = 16 / 2; // assigned 8

Instructions

Change the 0 so that the quotient is equal to 2.

Tests

tests:
  - text: Make the variable <code>quotient</code> equal to 2.
    testString: assert(quotient === 2, 'Make the variable <code>quotient</code> equal to 2.');
  - text: Use the <code>/</code> operator
    testString: assert(/\d+\s*\/\s*\d+/.test(code), 'Use the <code>/</code> operator');

Challenge Seed

var quotient = 66 / 0;


After Test

(function(z){return 'quotient = '+z;})(quotient);

Solution

var quotient = 66 / 33;