セクション 1. 章 62
single
Challenge: Counting Elements
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
You are given an array called fruitBasket that contains several fruit names.
Your tasks:
- Create a variable named
numberOfFruitsand assign it the length of thefruitBasketarray. - Use an
if...elsestatement to generate a message: - If there are 3 or fewer fruits, return:
"We have a small fruit basket with [number] fruits!" - If there are more than 3 fruits, return:
"We have a big fruit basket with [number] fruits!" - Use the
numberOfFruitsvariable inside the message. - Do NOT hardcode the number.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 62
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください