April 2018
Intermediate to advanced
284 pages
5h 46m
English
| Tip 25 | Combine Methods with Chaining |
In this tip, you’ll learn to perform multiple array methods with chaining.
Chaining is an old concept in programming. You can find it in many object-oriented languages.[20] Like a lot of programming concepts, it actually sounds more complicated than it is in practice.
Here’s a quick definition: Chaining is immediately calling a method on a returned object (which in some cases is the original object) without reassigning the value first.
Okay, now forget that definition. For our purposes, chaining means that you can call several array methods in a row (as long as you get an array back). It’s a convenient way to perform several actions in a very clear manner.
Think back to the last example: sending notifications ...
Read now
Unlock full access