Created
June 20, 2014 04:11
-
-
Save macikokoro/676ad74129bd8f378667 to your computer and use it in GitHub Desktop.
function to find the cube of a number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Accepts a number x as input and returns its square | |
var square = function (x) { | |
return x * x; | |
}; | |
// Accepts a number x as input and returns its cube | |
var cube = function (x) { | |
return x * x *x; | |
}; | |
cube(7); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment