Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 8, 2016 02:17
Show Gist options
  • Save codecademydev/0e669d3215b776f4edce2ca43c6bbc1b to your computer and use it in GitHub Desktop.
Save codecademydev/0e669d3215b776f4edce2ca43c6bbc1b to your computer and use it in GitHub Desktop.
Codecademy export
function Circle (radius) {
this.radius = radius;
this.area = function () {
return Math.PI * this.radius * this.radius;
};
this.perimeter = function() {
return 2 * Math.PI * this.radius;
};
// define a perimeter method here
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment