diff --git a/rules/S1126/javascript/rule.adoc b/rules/S1126/javascript/rule.adoc index 19c72317dca..805627121e7 100644 --- a/rules/S1126/javascript/rule.adoc +++ b/rules/S1126/javascript/rule.adoc @@ -1,6 +1,6 @@ == Why is this an issue? -The ``++if...else++`` statement is used to make decisions based on the truthiness of a boolean expression, and the ``++if++`` block executes when the expression is ``++true++``, while the ``++else++`` block executes when the expression is false. +The ``++if...else++`` statement is used to make decisions based on the truthiness of a boolean expression, and the ``++if++`` block executes when the expression is truthy, while the ``++else++`` block executes when the expression is falsy. Wrapping a boolean expression in an ``++if...else++`` statement and returning ``++true++`` or ``++false++`` in the respective blocks is redundant and unnecessary. It can also make the code harder to maintain, as it adds unnecessary lines of code that need to be read and understood.