From 6af0f0f448628e4a94b289ca7d900d3857fe08f2 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Sat, 30 Jan 2016 02:26:17 +0530 Subject: [PATCH] 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. --- .../basic-javascript.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index b2904407af..133e8bdcf2 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -3025,7 +3025,8 @@ "
function myFun() {
console.log(\"Hello\");
return \"World\";
console.log(\"byebye\")
}
myFun();
", "The above outputs \"Hello\" to the console, returns \"World\", but \"byebye\" is never output, because the function exits at the return statement.", "

Instructions

", - "Modify the function abTest so that if a or b are less than 0 the function will immediately exit with a value of undefined." + "Modify the function abTest so that if a or b are less than 0 the function will immediately exit with a value of undefined.", + "Hint
Remember that undefined is a keyword, not a string." ], "releasedOn": "January 1, 2016", "challengeSeed": [