Add a hint to Return Early Pattern for Functions

This commit adds a hint as disccussed in the issue, to clarify,
the difference between `undefined` and `"undefined"`.

Tested locally.
This commit is contained in:
Mrugesh Mohapatra
2016-01-30 02:26:17 +05:30
parent 317b27b614
commit a3c9d1fce6

View File

@ -3025,7 +3025,8 @@
"<blockquote>function myFun() {<br> console.log(\"Hello\");<br> return \"World\";<br> console.log(\"byebye\")<br>}<br>myFun();</blockquote>",
"The above outputs \"Hello\" to the console, returns \"World\", but <code>\"byebye\"</code> is never output, because the function exits at the <code>return</code> statement.",
"<h4>Instructions</h4>",
"Modify the function <code>abTest</code> so that if <code>a</code> or <code>b</code> are less than <code>0</code> the function will immediately exit with a value of <code>undefined</code>."
"Modify the function <code>abTest</code> so that if <code>a</code> or <code>b</code> are less than <code>0</code> the function will immediately exit with a value of <code>undefined</code>.",
"<strong>Hint</strong><br>Remember that <a href='http://www.freecodecamp.com/challenges/understanding-uninitialized-variables' target='_blank'><code>undefined</code> is a keyword</a>, not a string."
],
"releasedOn": "January 1, 2016",
"challengeSeed": [