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

Pyyhkäise näyttääksesi valikon

book
Challenge: Counting Elements

Tehtävä

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!".

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 5. Luku 9

Kysy tekoälyä

expand
ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

book
Challenge: Counting Elements

Tehtävä

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!".

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 5. Luku 9
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt