Skip to content

Building blocks #5

Description

@hellocan

Requirements
The constructor should take an array as an argument, this will contain 3 integers of the form [width, length, height] from which the Block should be created.

Examples
let b = new Block([2,4,6]) -> creates a Block object with a width of 2 a length of 4 and a height of 6

b.getWidth() // -> 2

b.getLength() // -> 4

b.getHeight() // -> 6

b.getVolume() // -> 48

b.getSurfaceArea() // -> 88

Your Test Cases:
let block = new Block([2,4,6]);
Test.assertEquals(block.getWidth(), 2)
Test.assertEquals(block.getLength(), 4)
Test.assertEquals(block.getHeight(), 6)
Test.assertEquals(block.getVolume(), 48)
Test.assertEquals(block.getSurfaceArea(), 88)
where By
http://www.codewars.com/kata/55b75fcf67e558d3750000a3/train/javascript

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions