Exponentiation

EasyAcc. 96.2%
+25 XP 8

Cubic Volume

Calculating powers is streamlined in modern JavaScript with the Exponentiation (**) operator.

  1. Calculate the volume of a cube where the side length is side.
  2. Formula: volume = side³.
  3. Return the string: "cube volume is [volume]".

01EXAMPLE 1

Inputside = 3
Output"cube volume is 27"

Explanation: 3 ** 3 = 27.

Constraints

  • Use the ** operator.
  • Follow exact string casing.
FundamentalsMathOperators
JavaScript
Loading...
9 Hidden

Input Arguments

side3

Expected Output

cube volume is 27

Click RUN to test your solution