← Back to challenges

Diagonal of a Cube

JavaScriptHardmathgeometry

Instructions

Create a function that takes the volume of a cube and returns the length of the cube's main diagonal, rounded to two decimal places.

Examples

cubeDiagonal(8) ➞ 3.46

cubeDiagonal(343) ➞ 12.12

cubeDiagonal(1157.625) ➞ 18.19

Notes

N/A

javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Solving Exponential Equations With Logarithms