Cube a number Javascript

Write a function called "cube".

Given a number, "cube" returns the cube of that number.

Can someone explain this to me please

**Voters**

vedprad1 (726)

This is simple mathematics. If you have a number, the cube of the number is that number multiplied by itself 3 times. In other words, the cube of `n`

is `n * n * n`

, or `n^3`

.

**If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!**

MDemery (0)

@vedprad1 nah it didn't answer the question

ash15khng (393)

@MDemery How did it not??

MDemery (0)

@ash15khng the way he explained it confused me once seen in the function I understood what he was trying to explain.

If you want the answer, it is here:

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!@vedprad1 thanks gthat works but I used

return Math.pow(num, 3);

but your way works as well