From bef9d5561a1216ff06a0612d07f2125ceca9ea84 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Sat, 26 Dec 2015 09:24:16 +0530 Subject: [PATCH] Comparison with the Equality Operator --- .../basic-javascript.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index b286b97af3..239ff2a1be 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -2276,14 +2276,14 @@ "id": "56533eb9ac21ba0edf2244d0", "title": "Comparison with the Equality Operator", "description": [ - "There are many Comparison Operators in Javascript. All of these operators return a boolean true or false value.", - "The most basic operators is the equality operator ==. The equality operator compares to values and returns true if they're equivilent or false if they are not. Note that equality is different from assignement (=), which returns the value to the right of the operator.", - "
function equalityTest(myVal) {
if (myVal == 10) {
return \"Equal\";
}
return \"Not Equal\";
}
", + "There are many Comparison Operators in JavaScript. All of these operators return a boolean true or false value.", + "The most basic operator is the equality operator ==. The equality operator compares two values and returns true if they're equivalent or false if they are not. Note that equality is different from assignment (=), which assigns the value at the right of the operator to a variable in the left.", + "
function equalityTest(myVal) {
if (myVal == 10) {
return \"Equal\";
}
return \"Not Equal\";
}
", "If myVal is equal to 10, the function will return \"Equal\". If it is not, the function will return \"Not Equal\".", "The equality operator will do it's best to convert values for comparison, for example:", - "
1 == 1 // true
\"1\" == 1 // true
1 == '1' // true
0 == false // true
0 == null // false
0 == undefined // false
null == undefined // true
", + "
1 == 1 // true
\"1\" == 1 // true
1 == '1' // true
0 == false // true
0 == null // false
0 == undefined // false
null == undefined // true
", "

Instructions

", - "Add the equality operator to the indicated line so the function will return \"Equal\" when val is equivilent to 12" + "Add the equality operator to the indicated line so that the function will return \"Equal\" when val is equivalent to 12" ], "releasedOn": "11/27/2015", "tests": [