Skip to content

Instantly share code, notes, and snippets.

View raynerpupo's full-sized avatar

Rayner Pupo raynerpupo

  • ThoughtWorks.
View GitHub Profile
@raynerpupo
raynerpupo / prototyping.md
Created March 9, 2018 16:42
JS Prototyping exercise

#Shapes Using the new ES6 features related to prototyping, implement a small library to define geometric shapes (not visually) and allow basic calculations. ###Requirements

  • The shapes to define are Circle, Square and Rectangle.
  • All shapes must define a function to calculate the area and perimeter .
  • Use a only positive coordinate system (implement validations while building the shapes or changing its properties).
  • Implement a predicate function collidesWith to check if the shape collides with another shape of the same type.
  • Given a list of shapes, print its properties and the area and perimeter properties.
  • All functionalities should be properly tested.
@raynerpupo
raynerpupo / gist:8b628c2a01b7cee98782e8681a076318
Last active January 13, 2017 19:57
Spike to research about tools to display charts

Selected library

Chartjs is a free and open source library widely used by the comunity, it supports several types of charts like the doughnut.

Usage

From the library docs