How to calculate the surface area of cuboid in JavaScript

1 Answer

0 votes
const length = 6;
const width = 3;
const height = 4;
         
const surfacearea = 2 * (length * width + width * height + height * length);
         
console.log("Surface Area of Cuboid is = " + surfacearea);
 
 


  
/*
run:
  
"Surface Area of Cuboid is = 108"
  
*/ 

 



answered Sep 10, 2021 by avibootz
...