Method chaining: Difference between revisions

Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 37:
 
Compare:
<sourcesyntaxhighlight lang=cpp>
a << b << c;
</syntaxhighlight>
</source>
equivalent to:
<sourcesyntaxhighlight lang=cpp>
a << b;
a << c;
</syntaxhighlight>
</source>
 
Another example in [[JavaScript]] uses the built-in methods of Array:
<sourcesyntaxhighlight lang=javascript>
somethings
.filter(x => x.count > 10)
.sort((a, b) => a.count - b.count)
.map(x => x.name)
</syntaxhighlight>
</source>
 
==See also==