Mastering switch

  • 16
Implement the switchTest method: 1. Don't use conditional operators. 2. Use 1 switch with 2 cases and 1 default. 3. Expected output: Output for E1.A: "it's E1.A", Output for E1.B: "it's E1.B", Output for E1.C: "it's E1.C", Output for E1.Y: "it's E1.Y", Output for E2.D: "it's E2.D".
You can't complete this task, because you're not signed in.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Guadalupe GagnonLevel 37 , Tampa
9 May 2019, 15:28
*Warning* The expected output in the task conditions and the expected output noted in the starting code do not match. Use the example from the conditions to pass.
RomanLevel 41
10 May 2019, 06:40
In the comment you can see output for code above:
In the task conditions you can see output for all cases:
Output for E1.A: "it's E1.A"
Output for E1.B: "it's E1.B"
Output for E1.C: "it's E1.C"
Output for E1.Y: "it's E1.Y"
Output for E2.D: "it's E2.D"
Output for E2.E: "it's E2.E"
Output for E2.F: "it's E2.F"
Output for all other values: "undefined".
all other values:
Output for E3.D: "undefined"
Output for E3.E: "undefined"
Output for E3.F: "undefined"
in the task we use:
Output for E1.C: "it's E1.C"
Output for E3.D: "undefined"
Output for E2.D: "it's E2.D"
Guadalupe GagnonLevel 37 , Tampa
10 May 2019, 13:09
The comment in the code is: It's E1.C < --- should be it's lowercase undefined It's E2.D <---- same
RomanLevel 41
13 May 2019, 06:10
Thanks, we'll fix it soon.