Respuesta :

Answer:

The answer to this question is given in the explanation section.

Explanation:

Let look at an if the else statement

if (condition1) {

 //some code if condition 1 is true

} else if (condition2) {

 // some code if condition 2 is true

} else {

 // some code if condition 3 is true

}

No let look at switch statement

switch(expression) {

 case x:

   // code block

   break;

 case y:

   // code block

   break;

 default:

   // code block

Now let look at your answer.

if then else should be replaced with switch if conditions are fixed.

in the process of replacing

write your condition of if statement  in the case area of swatch

Answer:

The answer to this question is given in the explanation section.

Explanation:

Let look at an if the else statement

if (condition1) {

//some code if condition 1 is true

} else if (condition2) {

// some code if condition 2 is true

} else {

// some code if condition 3 is true

}

No let look at switch statement

switch(expression) {

case x:

  // code block

  break;

case y:

  // code block

  break;

default:

  // code block

Now let look at your answer.

if then else should be replaced with switch if conditions are fixed.

in the process of replacing

write your condition of if statement  in the case area of swatch

ACCESS MORE