0
JS problem - Lesson about objects
Hi, can somebody help me with this, please?? What am I doing wrong? The given class represents a cuboid (e.g. a rectangular prism) that contains the properties of length, width, and height. Complete the program to calculate and output the volume of given cuboid to the console. var cuboid = { length: 25, width: 50, height: 200 }; //your code goes here var x = cuboid.length; var y = cuboid.width; var z = cuboid.height; function volum(x,y,z){ var t = x*y*z return t; } console.log(volum)
2 Answers
+ 2
It should be:
console.log(volum(x,y,z))
0
Marta Vall-llovera You haven't given the function arguments