These are a collection of tips and tricks you can use to improve the performance and readability of your code.
When your data can contain “outliers” that are clearly unintentional, you can clamp them to all fall within the same valid range.
We can turn arrays of key-value-pairs into objects with a function that is available on Object.
Add thrill and chaos to your code by adding a helper that only sometimes causes an infinite loop.
We can write a function that gives us the array object with the largest value for a specified property.
This helper function lets us remove all instances of specific values from an array.
Passing functions to other functions allows us to condense logic into a few lines of code.
We can chain many functions together into a single function. That new function takes one input and runs it through its individual functions one by one.
With this helper function, we can map over objects and change each of their values like we would do with arrays.