Javascript Unique Objects By Key

Suppose you have an array of objects in javascript: In the above contrived example 2 of the 3 objects have the same id value of a. We’d like to filter this array so that the result is: Javascript doesn’t have a built in unique function like other languages do. But we can use the filter…

React Hooks: useState with Arrays

I spent a good portion of the work day today trying to code up a simple form to accept a list of zip codes and put them in an array. The final form looks as follows: As you can see there are a few zip codes and then we can click the ‘Add Zip Code’…