title: Three dots on JavaScript problem while creating new objects that inherit from a existing one
body: <p>Let's say i have</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const adrian = {
      fullName: 'Adrian Oprea',
      occupation: 'Software developer',
      age: 31,
      website: 'https://oprea.rocks'
  };
  
  const bill = {
      ...adrian,
      fullName: 'Bill Gates',
      website: 'https://microsoft.com'
  };
  
  console.log(bill.fullName)</code></pre>
  </div>
  </div>
  </p>
  <p>I read on a website (<a href="https://oprearocks.medium.com/what-do-the-three-dots-mean-in-javascript-bc5749439c9a" rel="nofollow noreferrer">https://oprearocks.medium.com/what-do-the-three-dots-mean-in-javascript-bc5749439c9a</a>) that <code>...adrian,</code> would give the object <code>bill</code> the same properties of <code>adrian</code>. But when I try to execute the code, this error occurs:</p>
  <pre class="lang-none prettyprint-override"><code>    ...adrian,
      ^^^
  
  SyntaxError: Unexpected token ...
      at createScript (vm.js:56:10)
      at Object.runInThisContext (vm.js:97:10)
      at Module._compile (module.js:542:28)
      at Object.Module._extensions..js (module.js:579:10)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
      at Function.Module._load (module.js:438:3)
      at Module.runMain (module.js:604:10)
      at run (bootstrap_node.js:389:7)
      at startup (bootstrap_node.js:149:9)
  </code></pre>
  <p>Am I missing something to make this work?</p>