Adds switch statement MDN link
This commit is contained in:
parent
a0440d3961
commit
47ba2152f4
@ -79,6 +79,9 @@ var links = {
|
||||
"Array.splice()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice",
|
||||
"Array.toString()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString",
|
||||
|
||||
// ======== STATEMENTS AND DECLARATIONS
|
||||
"Switch Statement": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch",
|
||||
|
||||
// ======== MATH METHODS
|
||||
"Math.max()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max",
|
||||
"Math.min()": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min",
|
||||
|
@ -3446,6 +3446,9 @@
|
||||
"solutions": [
|
||||
"function myTest(val) {\n var answer = \"\";\n\n switch (val) {\n case 1:\n answer = \"alpha\";\n break;\n case 2:\n answer = \"beta\";\n break;\n case 3:\n answer = \"gamma\";\n break;\n case 4:\n answer = \"delta\";\n }\n return answer; \n}"
|
||||
],
|
||||
"MDNlinks": [
|
||||
"Switch Statement"
|
||||
],
|
||||
"tests": [
|
||||
"assert(myTest(1) === \"alpha\", 'message: <code>myTest(1) should have a value of \"alpha\"');",
|
||||
"assert(myTest(2) === \"beta\", 'message: <code>myTest(2) should have a value of \"beta\"');",
|
||||
|
Loading…
x
Reference in New Issue
Block a user