How to concatenate objects in JavaScript

Objects
Last updated Feb 16, 2018
const defaultOptions = {
  verbose: false,
  src: "./src",
  dist: "./dist"
};
const userOptions = { verbose: true };

const options = { ...defaultOptions, ...userOptions };
{
    verbose: true,
    src: "./src",
    dist: "./dist"
}