.
.
This stage we're going to introduce a new operator, the division operator: /.
今回は新しい演算子、除算演算子:/を紹介します。
.
The divide operator takes two inputs and divides the left-side by the right-side. So 8 / 4 would evaluate to 2.
除算演算子は2つの入力を受け取り、左側の値を右側の値で割ります。なので8/4は2になります。
.
.
.
.
In this exercise we're going to work on averages.
この練習では平均値について学びます。
.
Let's think about how to determine the average of three numbers.
3つの数字の平均値をどう求めるか考えてみましょう。
.
The average of the three values 4, 5 and 6 is 5. The algorithm for figuring this out is summing all three values and then dividing by the total number of values (3).
4、5、6の3つの値の平均値は5です。それを求めるアルゴリズムは3つの値を足し合わせ、その後全体の値で割ることです(3)。
.
In this case, the sum of 4, 5, and 6 is 15. Then we divide 15 by 3 (15 / 3) to get 5.
この場合、4、5、6の合計は15です。その後、15を3で割ります(15/3)して5を得ます。
.
In order to ensure that the operations occur in the order you expect you can break them up line by line:
演算が期待通りに行われるようにするためには、1行1行に分けることができます。
.
const sum = 1 + 2 + 3;
const average = sum / 3;
.
Or you can use parenthesis:
または、括弧を使用することもできます。
.
const average = (1 + 2 + 3) / 3;
.
Learn more about the order of operations in details.
演算順序について更に学ぶには、Detailsを参照してください。
.
.
.
.
1.Taking what you learned above, find the average of four numerical values a, b, c, and d.
1.上記で学んだことを使用して、4つの数値a、b、c、dの平均値を求めます。
.
2.Once you have found the average, be sure to return it.
2.平均値を求めたら、必ずそれをリターンで返しましょう。
.
.

