Design Patterns · Middle · Question 68 of 75

What are data clumps, and how are they fixed?

function book(start: Date, end: Date, ...) {}
function price(start: Date, end: Date, ...) {}

Explanation

The new type is a natural home for related behavior like range.includes(date) or range.nights.

Further reading

Problem with a question

Design Patterns · Middle · question 68

Test yourself

Take the Design Patterns · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz