Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.02 KB

File metadata and controls

40 lines (24 loc) · 1.02 KB

Tasks

Part 1: Advanced Objects

In class we will aim to solve Object.size and Object.min.

Then, continue with the following instructions

  1. Make sure you understand the solutions to the first two functions

  2. Take a look at the next function, Object.max. Think about the steps you will need to take to identify the maximum value in an object, and write the steps out in pseudocode.

  3. Add a .only to the test for this function and run it with npm test, to see it fail (Red, Green, Refactor!):

Adding a .only

  1. Implement the code for this function.

  2. Run the tests again, hopefully they now pass.

  3. Continue this process for the remaining functions:

    • clone
    • get
    • has
    • sum
    • invert
    • addAll

Part 2: Functions as values

There are only 3 functions to complete this week.

Implement the following functions using TDD:

  • find
  • every
  • some

Remember that the tests are already written and will help you understand how the functions are intended to be used.