Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Counting Elements | Exploring Arrays
Introduction to JavaScript

Scorri per mostrare il menu

book
Challenge: Counting Elements

Compito

Swipe to start coding

  • Initialize numberOfFruits with the length of the fruitBasket array.
  • If numberOfFruits has 3 or fewer fruits, print: "We have a small fruit basket with [number] fruits!", where [number] should be the number of fruits.
  • If numberOfFruits has more than 3 fruits, print: "We have a big fruit basket with [number] fruits!".

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 9
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?

Chieda ad AI

expand
ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

book
Challenge: Counting Elements

Compito

Swipe to start coding

  • Initialize numberOfFruits with the length of the fruitBasket array.
  • If numberOfFruits has 3 or fewer fruits, print: "We have a small fruit basket with [number] fruits!", where [number] should be the number of fruits.
  • If numberOfFruits has more than 3 fruits, print: "We have a big fruit basket with [number] fruits!".

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 9
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt