Skip to content

Instantly share code, notes, and snippets.

@iam-peekay
Last active December 8, 2016 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iam-peekay/23ce60dacfd772ba441e94c2a73e0d9a to your computer and use it in GitHub Desktop.
Save iam-peekay/23ce60dacfd772ba441e94c2a73e0d9a to your computer and use it in GitHub Desktop.
/* @flow */
class Rectangle {
width: number;
height: number;
constructor(width, height) {
this.width = width;
this.height = height;
}
circumference() {
return (this.width * 2) + (this.height * 2)
}
area() {
return this.width * this.height;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment