Iterating Collections

There's no faster way to iterate!

Tip Screenshot

Get your hands some rest! 😌

Dealing with collection-like objects is easy if you have live and postfix templates at your finger tips. Either write foreach as a single word, or add .foreach at the end of your collection object. Then, just hit TAB and confirm the different hotspot variables: collection object (only live template), type name vs. var keyword, and the iteration variable name. In most cases, the variable name can already be inferred from the collection object name. Good naming pays off! 😉

Which way is your favorite? ⭐️

See Also