如何创建和调用接受三个参数(页面长度)的JavaScript函数并计算块的面积
答
// 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
谢谢你的男人:) –
您应该从另一个问题中提出您的示例代码。 –
我来自波斯尼亚,所以有些字可能你不明白,但这里是一个html: –
把它放在你的问题。 –