.
.
Now we're going to learn about two things: the multiplication operator and passing multiple function inputs!
今度は2つのことを学ぶことになります:乗算演算子と複数の関数入力を渡すことです!
.
.
In the last stage we added numbers together with the + operator. We can also multiply numbers using the multiplication operator:
前回のステージでは+演算子を使って数値を足し合わせました。乗算演算子を使用して数値を乗算することもできます:
.
const a = 2;
const b = a * 3;
.
Here, b will have the value 6! We are using the multiplication operator to multiply 2 and 3.
ここでは、bには値6が入っています! 2と3を乗算するために乗算演算子を使用しています。
.
.
.
On the last stage we learned how to define an input for a function. We can expand on this by accepting several inputs, separated by a comma!
前回のステージでは関数の入力を定義する方法を学びました。これを拡張して、カンマで区切る事によって、複数の入力を受け入れることができます!
.
function sum(a, b, c) {
return a + b + c;
}
.
Here, our function sum accepts three inputs a, b, and c. It will add these three values and return the sum.
ここでは、関数sumは3つの入力a、b、cを受け入れます。それら3つの値を足し合わせ、合計値を返します。
.
Calling sum(3,4,5) would return the value 12!
sum(3,4,5)を呼び出すと値12が返ります!
.
.
.
.
Take two inputs in our product function and multiply them together using the * operator. Return this value.
product関数に2つの入力を取り、それらを*演算子を使用して掛け合わせます。それを返します。
.
The result of multiplication is commonly referred to as the product.
乗算の結果は通常、積と呼ばれます。
.
.
.
.

