Skip to content

Instantly share code, notes, and snippets.

@macikokoro
Created June 20, 2014 04:11
Show Gist options
  • Save macikokoro/676ad74129bd8f378667 to your computer and use it in GitHub Desktop.
Save macikokoro/676ad74129bd8f378667 to your computer and use it in GitHub Desktop.
function to find the cube of a number.
// 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