Skip to content

Commit

Permalink
Merge pull request freeCodeCamp#11673 from robbawebba/fix/comparison-…
Browse files Browse the repository at this point in the history
…challenge-instruction

Modify return value in comparison challenge
  • Loading branch information
systimotic authored Nov 17, 2016
2 parents e6b877f + 91f2709 commit 91f7ea6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3316,24 +3316,24 @@
" return \"Smaller Than or Equal to 24\";",
" }",
"",
" return \"25 or More\";",
" return \"More Than 24\";",
"}",
"",
"// Change this value to test",
"testLessOrEqual(10);",
""
],
"solutions": [
"function testLessOrEqual(val) {\n if (val <= 12) { // Change this line\n return \"Smaller Than or Equal to 12\";\n }\n \n if (val <= 24) { // Change this line\n return \"Smaller Than or Equal to 24\";\n }\n\n return \"25 or More\";\n}"
"function testLessOrEqual(val) {\n if (val <= 12) { // Change this line\n return \"Smaller Than or Equal to 12\";\n }\n \n if (val <= 24) { // Change this line\n return \"Smaller Than or Equal to 24\";\n }\n\n return \"More Than 24\";\n}"
],
"tests": [
"assert(testLessOrEqual(0) === \"Smaller Than or Equal to 12\", 'message: <code>testLessOrEqual(0)</code> should return \"Smaller Than or Equal to 12\"');",
"assert(testLessOrEqual(11) === \"Smaller Than or Equal to 12\", 'message: <code>testLessOrEqual(11)</code> should return \"Smaller Than or Equal to 12\"');",
"assert(testLessOrEqual(12) === \"Smaller Than or Equal to 12\", 'message: <code>testLessOrEqual(12)</code> should return \"Smaller Than or Equal to 12\"');",
"assert(testLessOrEqual(23) === \"Smaller Than or Equal to 24\", 'message: <code>testLessOrEqual(23)</code> should return \"Smaller Than or Equal to 24\"');",
"assert(testLessOrEqual(24) === \"Smaller Than or Equal to 24\", 'message: <code>testLessOrEqual(24)</code> should return \"Smaller Than or Equal to 24\"');",
"assert(testLessOrEqual(25) === \"25 or More\", 'message: <code>testLessOrEqual(25)</code> should return \"25 or More\"');",
"assert(testLessOrEqual(55) === \"25 or More\", 'message: <code>testLessOrEqual(55)</code> should return \"25 or More\"');",
"assert(testLessOrEqual(25) === \"More Than 24\", 'message: <code>testLessOrEqual(25)</code> should return \"More Than 24\"');",
"assert(testLessOrEqual(55) === \"More Than 24\", 'message: <code>testLessOrEqual(55)</code> should return \"More Than 24\"');",
"assert(code.match(/val\\s*<=\\s*('|\")*\\d+('|\")*/g).length > 1, 'message: You should use the <code>&lt;=</code> operator at least twice');"
],
"type": "waypoint",
Expand Down

0 comments on commit 91f7ea6

Please sign in to comment.