Sfida: Conteggio degli Elementi
Compito
Swipe to start coding
- Inizializzare
numberOfFruits
con la lunghezza dell'arrayfruitBasket
. - Se
numberOfFruits
contiene 3 o meno frutti, stampare:"We have a small fruit basket with [number] fruits!"
, dove[number]
rappresenta il numero di frutti. - Se
numberOfFruits
contiene più di 3 frutti, stampare:"We have a big fruit basket with [number] fruits!"
.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!