diff --git a/1-js/02-first-steps/10-ifelse/article.md b/1-js/02-first-steps/10-ifelse/article.md index 82e8800b9c..4995648a3a 100644 --- a/1-js/02-first-steps/10-ifelse/article.md +++ b/1-js/02-first-steps/10-ifelse/article.md @@ -31,7 +31,7 @@ if (year == 2015) { We recommend wrapping your code block with curly braces `{}` every time you use an `if` statement, even if there is only one statement to execute. Doing so improves readability. -## Boolean conversion +## Boolean conversion [#boolean-conversion] The `if (…)` statement evaluates the expression in its parentheses and converts the result to a boolean. diff --git a/1-js/02-first-steps/11-logical-operators/article.md b/1-js/02-first-steps/11-logical-operators/article.md index 78c4fd2f1b..d4b07cfa1b 100644 --- a/1-js/02-first-steps/11-logical-operators/article.md +++ b/1-js/02-first-steps/11-logical-operators/article.md @@ -29,7 +29,7 @@ alert( false || false ); // false As we can see, the result is always `true` except for the case when both operands are `false`. -If an operand is not a boolean, it's converted to a boolean for the evaluation. +If an operand is not a boolean, it's converted to a boolean for the evaluation. This is part of the familiar [truthy/falsy](info:ifelse#boolean-conversion) concept. For instance, the number `1` is treated as `true`, the number `0` as `false`:
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: