How to omit specific properties from an object in JavaScript

const { bar, baz, ...qux } = foo

Now your object qux has all of the properties of foo except for bar and baz.

Leave a Comment