fix(curriculum): add switch statement spaces for consistency (#46141)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Benjamin Lu
2022-05-25 13:07:00 -04:00
committed by GitHub
parent 75241dae15
commit 2da688fbfe
3 changed files with 6 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ If the `break` statement is omitted from a `switch` statement's `case`, the foll
```js
let result = "";
switch(val) {
switch (val) {
case 1:
case 2:
case 3:
@@ -127,7 +127,7 @@ sequentialSizes(1);
function sequentialSizes(val) {
let answer = "";
switch(val) {
switch (val) {
case 1:
case 2:
case 3:

View File

@@ -24,7 +24,7 @@ if (val === 1) {
can be replaced with:
```js
switch(val) {
switch (val) {
case 1:
answer = "a";
break;
@@ -136,7 +136,7 @@ chainToSwitch(7);
function chainToSwitch(val) {
let answer = "";
switch(val) {
switch (val) {
case "bob":
answer = "Marley";
break;

View File

@@ -14,7 +14,7 @@ If you have many options to choose from, use a <dfn>switch</dfn> statement. A `s
Here is an example of a `switch` statement:
```js
switch(lowercaseLetter) {
switch (lowercaseLetter) {
case "a":
console.log("A");
break;
@@ -96,7 +96,7 @@ caseInSwitch(1);
function caseInSwitch(val) {
let answer = "";
switch(val) {
switch (val) {
case 1:
answer = "alpha";
break;