From e8b6a9e5dd2a43f1c392656acdf257bff77ff098 Mon Sep 17 00:00:00 2001
From: rajapandi_vijayakumar <67140701+vrpcse@users.noreply.github.com>
Date: Mon, 9 Nov 2020 22:39:21 +0530
Subject: [PATCH] fix(learn): add example declaration for clarity (#40207)
Variable declaration is added which is used inside the switch case.
---
.../multiple-identical-options-in-switch-statements.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md
index 64368361d5..5327d58677 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md
@@ -11,6 +11,7 @@ forumTopicId: 18242
If the break
statement is omitted from a switch
statement's case
, the following case
statement(s) are executed until a break
is encountered. If you have multiple inputs with the same output, you can represent them in a switch
statement like this:
```js
+var result = "";
switch(val) {
case 1:
case 2: