Fruit shop

Report a typo

Type the result of the following snippet of code:

Use a space as a divider for rows.

const fruit = "apple";

switch (fruit) {
  case "orange":
    console.log("$5");
    console.log("per kg")
    break;
  case "apple":
    console.log("$0.5");
    console.log("for a piece")
  default:
    console.log("$2")
    break;
}
Enter a short text
___

Create a free account to access the full topic