Hello. I'm stuck at the switch statement chalenge and I would need some help to solve it.
Here is the link to the chalenge - https://teamtreehouse.com/library/swift-collections-and-control-flow/control-flow-with-conditional-statements/working-with-switch-statements .
Zimri Leijen11,676 Points
switch (condition) case "a": // in other words if condition == a // action a (for example europeanCapitals.append(value) case "b": // action b default: // fallback action when neither of the cases match
you could use
key as your
condition and append the value to the right array.
You'll have to make some kind of lookup table for which city belongs to which continent.