Skip to content

Instantly share code, notes, and snippets.

@stevencombs stevencombs/Methods.js
Last active Dec 23, 2015

Embed
What would you like to do?
// Javascript Getting Started with Programming
// A Codecademy Javascript (Methods) assignment
// Dr. Steven B. Combs, coding novice
// Radius Function
function Circle (radius) {
this.radius = radius;
this.area = function () {
return Math.PI * this.radius * this.radius;
};
// Perimeter method
this.perimeter = function(){
return 2 * Math.PI * this.radius;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.