Try to peel a tropical fruit to eat.
tropic.peel(TropicalFruit.Banana);
- fruit: a
TropicalFruit
to peel and eat, which is either:banana
,pineapple
, orcoconut
.
- a boolean value which is
true
if the fruit was peeled,false
if not.
Try and pick a coconut from a tropical tree. Can you peel it?
let peeled = false
if (tropic.pick(TropicalFruit.Coconut)) {
peeled = tropic.peel(TropicalFruit.Coconut)
}
tropic