Skip to content

Instantly share code, notes, and snippets.

@stefanjudis
Created October 2, 2019 13:30
Show Gist options
  • Select an option

  • Save stefanjudis/5219d2d7f8e35a996971de43336e9024 to your computer and use it in GitHub Desktop.

Select an option

Save stefanjudis/5219d2d7f8e35a996971de43336e9024 to your computer and use it in GitHub Desktop.

Revisions

  1. stefanjudis created this gist Oct 2, 2019.
    10 changes: 10 additions & 0 deletions smart-spread.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    const CPU = {
    ram: '32gb',
    ssd: '64gb',
    micro: 'i7'
    };

    const { ssd, ...newCPU } = CPU;

    console.log(newCPU);
    // Object { ram: "32gb", micro: "i7" }