<p dir="auto">Using function shorthand in Object literals:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var store = {
  save() { },
  load() { },
  delete() { },
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">store</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-en">save</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-en">delete</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Generates this JavaScript</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

var store = {
  save: function save() {},
  load: function load() {},
  &quot;delete&quot;: function delete() {} };"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>

<span class="pl-k">var</span> <span class="pl-s1">store</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-en">save</span>: <span class="pl-k">function</span> <span class="pl-en">save</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-en">load</span>: <span class="pl-k">function</span> <span class="pl-en">load</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-s">"delete"</span>: <span class="pl-k">function</span> <span class="pl-en">delete</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The problem is here — delete is a reserved word and cannot be used as an identifier name in function declarations:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  &quot;delete&quot;: function delete() {} };
                     ^^^^^^"><pre class="notranslate"><code class="notranslate">  "delete": function delete() {} };
                     ^^^^^^
</code></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var foo = {
  try() {},
  throw() {},
  catch() {},
  switch() {},
  // etc.
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-en">try</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-en">throw</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-en">switch</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-c">// etc.</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="SyntaxError: Unexpected token catch
    at Function (native)
    at compile (https://6to5.org/repl.html:200:33)"><pre class="notranslate">SyntaxError: <span class="pl-v">Unexpected</span> <span class="pl-s1">token</span> <span class="pl-k">catch</span>
    <span class="pl-s1">at</span> <span class="pl-v">Function</span> <span class="pl-kos">(</span><span class="pl-s1">native</span><span class="pl-kos">)</span>
    <span class="pl-s1">at</span> <span class="pl-s1">compile</span> <span class="pl-kos">(</span><span class="pl-s1">https</span>:<span class="pl-c">//6to5.org/repl.html:200:33)</span></pre></div>
<p dir="auto">This was working in 1.x.</p>