From 44de5cb468ccb372de60a1376b5501a61b05714e Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Sun, 27 Dec 2015 13:26:21 +0530 Subject: [PATCH] Returning Boolean Values from Functions --- .../basic-javascript.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index f0416f30d9..f8a2e4bfb5 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -3359,7 +3359,7 @@ "id": "5679ceb97cbaa8c51670a16b", "title": "Returning Boolean Values from Functions", "description": [ - "You may recall from Comparison with the Equality Operator that all comparison operators return a boolean true or false value.", + "You may recall from Comparison with the Equality Operator that all comparison operators return a boolean true or false value.", "A common anti-pattern is to use an if/else statement to do a comparison and then return true/false:", "
function isEqual(a,b) {
if(a === b) {
return true;
} else {
return false;
}
}
", "Since === returns true or false, we can simply return the result of the comparion:", @@ -3390,7 +3390,9 @@ "" ], "solutions": [ - "" + "function isLess(a, b) {", + " return a < b;", + "}" ], "type": "waypoint", "challengeType": "1",