Why the step of filtered and assigned the filtered value have to be separated ? I can’t figure out why we have to wait the result to assign them to a new variable.
Sorry if it’s an obvious question, I’d rather ask than stay stupid
It’s really hard to explain it without giving the answer to that challenge. Turn out, after going further in it, that it’s made to understand “better” the way the method works
if you want to look at the output of a method before feeding it to an other method, you can’t chain — for example debugging well usually requires not chaining methods.
Chaining vs. not chaining can also be a stylistic or readability choice.
The only rule is that you can chain a method only if the previous method outputs the right datatype