From cb3db952ee2921a7a8b84e2872154009ca3c1e81 Mon Sep 17 00:00:00 2001 From: rupali317 Date: Sat, 2 Mar 2019 13:39:15 +0800 Subject: [PATCH] fix: update guide article for javascript conditional ternary operator (#35388) --- .../use-the-conditional-ternary-operator/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator/index.md index 646925f533..2f216ede01 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator/index.md @@ -25,7 +25,7 @@ Use ternary operator to check for equality. ```javascript function checkEqual(a, b) { - return a === b ? true : false; + return a === b ? "Equal" : "Not Equal"; } ``` @@ -33,4 +33,4 @@ function checkEqual(a, b) { * A function `checkEqual` is declared, it accepts two parameters in variables `a` and `b`. * The `return` statement would return the value of the evaluated ternary expression. -* The ternary expression checks if `a` and `b` are equal or not and returns `true` or `false` respectively. +* The ternary expression checks if `a` and `b` are equal or not and returns `Equal` or `Not Equal` respectively.