From 180e9dd1deb22888cfa1d265a9a96d86c4680daa Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Thu, 4 May 2023 03:44:53 -0700 Subject: [PATCH] fix: remove comments from code examples (#50254) --- .../63f29ce62aea65eb041758c8.md | 12 ++++-------- .../641fcfd468185384ac218b7d.md | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md index b5eb5f63546..6f9e5b2a05c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md @@ -16,19 +16,15 @@ This is the basic syntax for a `switch` statement: ```js switch (expression) { case 1: - /* - this code will execute - if the case matches the expression - */ + console.log("1"); break; default: - /* - the default will execute if none - of the other cases match the expression - */ + console.log("Not 1"); } ``` +In this example, the first `case` checks if `expression === 1`, and if so logs `1` to the console. If no cases are true, it will log `Not 1` to the console. The `break` statement stops execution of the `switch` when the `case` is true. + Add a `switch` statement and use `e.target.value` for the expression. # --hints-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md index d64d4499801..37793932394 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md @@ -11,7 +11,7 @@ Before you can move onto the next `case`, you will need to add a `break` stateme ```js case "example": - // code goes here + console.log("example"); break; ```