Skip to content
Cube a number Javascript
Profile icon
MDemery

Write a function called "cube".

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

Can someone explain this to me please

You are viewing a single comment. View All
Profile icon
MDemery

@vedprad1
thanks gthat works but I used

return Math.pow(num, 3);

but your way works as well