Skip to content

Instantly share code, notes, and snippets.

@lilobase
Last active January 29, 2016 14:06
Show Gist options
  • Save lilobase/be581c86b9d65f53c42a to your computer and use it in GitHub Desktop.
Save lilobase/be581c86b9d65f53c42a to your computer and use it in GitHub Desktop.
const old_box_surface = (sides) => ((sides[0] + sides[1] + sides[2]) * 2) + smallest_side(sides);
const box_surface = (sides) =>
(sides.reduce((acc, side) => (acc + side)) * 2) + smallest_side(sides);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment