Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Calculating the Speed of a Car | Section
JavaScript Fundamentals
セクション 1.  45
single

single

bookChallenge: Calculating the Speed of a Car

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

If we know the distance a car has traveled and the time it took to cover that distance, we can calculate its average speed using the formula:

Speed = Distance / Time Taken

The distance is measured in meters and the time in seconds.
Use the following values in your calculation: Distance = 1000, Time Taken = 120.

Your tasks:

  1. Define a function called calcSpeed.
  2. Declare the variables distance and timeTaken inside the function using the values above.
  3. Calculate the speed using the formula.
  4. Return the calculated speed.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  45
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt