Method chaining is a helpful pattern to learn in programming. It complies with the functional, declarative approach and reduces repetition.
Chain them all
- Each of the methods needs to return something in order to call another method on it. Hence the chaining name.