Last active
April 18, 2018 20:00
-
-
Save kudapara/a55c80c356ac1bf8d8ba1cf3dc2fda4d to your computer and use it in GitHub Desktop.
Using the shapes file
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
const circle = new Circle(7) | |
const square = new Square(3) | |
const shapes = [circle, square] | |
const areaCalculator = new AreaCalculator(shapes) | |
const areaOutput = new CalculatorOutput(areaCalculator) | |
// now we can access each output type | |
console.log(output.toString()) | |
console.log(output.toJSON()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment