Skip to content

Commit f2a099b

Browse files
authored
Merge pull request #1877 from janina213/patch-1
add break to switch case example
2 parents d65141d + ec9ae12 commit f2a099b

File tree

1 file changed

+1
-0
lines changed
  • 1-js/02-first-steps/17-javascript-specials

1 file changed

+1
-0
lines changed

1-js/02-first-steps/17-javascript-specials/article.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ let age = prompt('Your age?', 18);
213213
switch (age) {
214214
case 18:
215215
alert("Won't work"); // the result of prompt is a string, not a number
216+
break;
216217
217218
case "18":
218219
alert("This works!");

0 commit comments

Comments
 (0)