Skip to content
Snippets Groups Projects
Commit 2612030f authored by ttran67's avatar ttran67
Browse files

Fixed C

parent d5866806
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,17 @@ export function decodeCountingNumber(word) { ...@@ -5,7 +5,17 @@ export function decodeCountingNumber(word) {
// INSTRUCTIONS: Use a switch statement to set meaning to 0, 1, 2, 3, or 4 if // INSTRUCTIONS: Use a switch statement to set meaning to 0, 1, 2, 3, or 4 if
// word is 'zero', 'one', two', 'three', or 'four', respectively. Leave // word is 'zero', 'one', two', 'three', or 'four', respectively. Leave
// meaning undefined in the default case. // meaning undefined in the default case.
// if (word === 'zero'){
meaning = 0;
} else if (word === 'one'){
meaning = 1;
} else if (word === 'two'){
meaning = 2;
} else if (word === 'three'){
meaning = 3;
} else if (word === 'four'){
meaning = 4;
}
// Resources: // Resources:
// <https://javascript.info/switch> // <https://javascript.info/switch>
// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch> // <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment