Desafío: Contar Elementos
Tarea
Swipe to start coding
- Inicializar
numberOfFruits
con la longitud del arreglofruitBasket
. - Si
numberOfFruits
tiene 3 frutas o menos, imprimir:"We have a small fruit basket with [number] fruits!"
, donde[number]
debe ser el número de frutas. - Si
numberOfFruits
tiene más de 3 frutas, imprimir:"We have a big fruit basket with [number] fruits!"
.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 5. Capítulo 9