From 6aa8aeda721f7832f75885be8c59fb56e1a312c4 Mon Sep 17 00:00:00 2001 From: Eric Jae-Min Joo Date: Fri, 7 Dec 2018 03:47:43 -0500 Subject: [PATCH] Add a greater detailed explanation of the Javascript example that is used. (#23787) --- guide/english/javascript/if-else-statement/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guide/english/javascript/if-else-statement/index.md b/guide/english/javascript/if-else-statement/index.md index b72ddab897..5bca5e4626 100644 --- a/guide/english/javascript/if-else-statement/index.md +++ b/guide/english/javascript/if-else-statement/index.md @@ -65,14 +65,16 @@ const num = someCondition ? 1 : 2; **Using** `if...else`: ```javascript -// If x = 5, then z = 7 and q = 42. -// If x is not 5, then z = 19. + +// If x is equal to 5, then the condition is TRUE. This results in z being set to 7 and q being set to 42. +// If x does not equal to 5, then the condition is FALSE. This results in z being set to 19. if (x == 5) { z = 7; q = 42 } else { z = 19; } + ``` **Using** `else if`: