如何创建和调用接受三个参数(页面长度)的JavaScript函数并计算块的面积

问题描述:

我想编写接受3个参数并返回块的区域的函数。我已经研究了几天,但没有答案。我需要一些帮助。如何创建和调用接受三个参数(页面长度)的JavaScript函数并计算块的面积

+1

您应该从另一个问题中提出您的示例代码。 –

+0

我来自波斯尼亚,所以有些字可能你不明白,但这里是一个html: –

+0

把它放在你的问题。 –

// We declare the function 
var areaOfBlock = function(a,b,c) { 
    // we tell it to return to us what it gets 
    // when it multiplies a by b and then that answer 
    // by c 

    // could also be written like: 
    // var area = a * b *c; 
    // return area; 

    return a * b * c; 
} 
+0

谢谢你的男人:) –