From 7af71de4f2435301762a9e60a485ea448b854ecc Mon Sep 17 00:00:00 2001
From: puru-khedre <101047627+puru-khedre@users.noreply.github.com>
Date: Wed, 12 Oct 2022 19:14:53 +0530
Subject: [PATCH] Update JavaScript switch statement (#2161)
add syntax highlighting in code snippet.
---
.../101-conditional-statements/101-switch.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/101-switch.md b/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/101-switch.md
index 2990bab05..89a664145 100644
--- a/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/101-switch.md
+++ b/content/roadmaps/106-javascript/content/107-javascript-control-flow/101-conditional-statements/101-switch.md
@@ -1,8 +1,9 @@
-# Switch
+# Switch Case
The `switch` statement evaluates an expression, matching the expression's value against a series of `case` clauses, and executes statements after the first `case` clause with a matching value, until a `break` statement is encountered. The `default` clause of a `switch` statement will be jumped to if no `case` matches the expression's value.
-```
+## Example
+```js
switch (expression) {
case value1:
//Statements executed when the result of expression matches value1
@@ -22,4 +23,4 @@ switch (expression) {
Free Content
switch - MDN
-The switch statement
+The switch statement - javascript.info