-
-
Save codecademydev/2bd8e9d60ebff590e243ce6e48f05646 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains 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
var square = new Object(); | |
square.sideLength = 6; | |
square.calcPerimeter = function() { | |
return this.sideLength * 4; | |
}; | |
// help us define an area method here | |
square.calcArea = function() { | |
return this.sideLength * this.sideLength; | |
}; | |
var p = square.calcPerimeter(); | |
var a = square.calcArea(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment