title: Destructuring to get the last element of an array in es6
body: <p>In coffeescript this is straightforward:</p>
  
  <pre><code>coffee&gt; a = ['a', 'b', 'program']
  [ 'a', 'b', 'program' ]
  coffee&gt; [_..., b] = a
  [ 'a', 'b', 'program' ]
  coffee&gt; b
  'program'
  </code></pre>
  
  <p>Does es6 allow for something similar?</p>
  
  <pre><code>&gt; const [, b] = [1, 2, 3]                              
  'use strict'                                           
  &gt; b  // it got the second element, not the last one!                      
  2                                                      
  &gt; const [...butLast, last] = [1, 2, 3]          
  SyntaxError: repl: Unexpected token (1:17)                                                                                                                                                        
  &gt; 1 | const [...butLast, last] = [1, 2, 3]                                                                                                                                                        
      |                  ^                                                                                                                                                                          
      at Parser.pp.raise (C:\Users\user\AppData\Roaming\npm\node_modules\babel\node_modules\babel-core\node_modules\babylon\lib\parser\location.js:24:13)                                           
  </code></pre>
  
  <p>Of course I can do it the es5 way -</p>
  
  <pre><code>const a = b[b.length - 1]
  </code></pre>
  
  <p>But maybe this is a bit prone to off by one errors. Can the splat only be the last thing in the destructuring?</p>