Divide One Number by Another with JavaScript
This commit is contained in:
committed by
SaintPeter
parent
be6bdd6228
commit
7bf255e47c
@ -355,11 +355,14 @@
|
|||||||
"description": [
|
"description": [
|
||||||
"We can also divide one number by another.",
|
"We can also divide one number by another.",
|
||||||
"JavaScript uses the <code>/</code> symbol for division.",
|
"JavaScript uses the <code>/</code> symbol for division.",
|
||||||
|
"",
|
||||||
|
"<strong>Example</strong><blockquote>16 / 2 = 8</blockquote>",
|
||||||
|
"",
|
||||||
"<h4>Instructions</h4>",
|
"<h4>Instructions</h4>",
|
||||||
"Change the <code>0</code> so that <code>answer</code> will equal <code>2</code>."
|
"Change the <code>0</code> so that <code>quotient</code> will equal to <code>2</code>."
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(answer === 2, 'message: Make the variable <code>answer</code> equal 2.');",
|
"assert(quotient === 2, 'message: Make the variable <code>quotient</code> equal to 2.');",
|
||||||
"assert(/\\d+\\s*\\/\\s*\\d+/.test(editor.getValue()), 'message: Use the <code>/</code> operator');"
|
"assert(/\\d+\\s*\\/\\s*\\d+/.test(editor.getValue()), 'message: Use the <code>/</code> operator');"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
@ -368,7 +371,7 @@
|
|||||||
""
|
""
|
||||||
],
|
],
|
||||||
"tail": [
|
"tail": [
|
||||||
"(function(z){return 'answer = '+z;})(answer);"
|
"(function(z){return 'quotient = '+z;})(quotient);"
|
||||||
],
|
],
|
||||||
"type": "waypoint",
|
"type": "waypoint",
|
||||||
"challengeType": "1"
|
"challengeType": "1"
|
||||||
|
Reference in New Issue
Block a user