Switch4

Exercise

Finish the switch statement. Add the following cases: BMW, Ford and Peugeot. Set the value of the variable text to: "German car" for BMW. "American car" for Ford. "French car" for Peugeot. Also add a default case where the text value is "Unknown car name".

Your code

Result

All exercises · Next: For1 →