Programming Patterns I Like

Programming Patterns I Like

These patterns are in no particular order just a simple collection. I prefer using an object literal instead, here’s why:

This pattern is nothing really special and I should have realized it sooner but I found myself filtering a collection of items to get all items that matched a certain condition, then doing that again for a different condition. I started deferring to ternaries and nested ternaries and I found I was able to quickly understand at a glance what was happening.

Source: www.johnstewart.dev