title: Spread operator alternative
body: <p>I have the following code I received:</p>
  
  <pre><code>function sortByProp(...props) {
    const callback = props.pop();
    return function(a, b) {
      const v1 = retrieve(props, a);
      const v2 = retrieve(props, b);
      return callback(v1, v2);
    } 
  }
  </code></pre>
  
  <p>It works great in most browsers, but not in opera. I get the following error:</p>
  
  <pre><code>function sortByProp(...props) {
                      ^^^
  SyntaxError: Unexpected token ...
  </code></pre>
  
  <p>I visited <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator" rel="nofollow">https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Spread_operator</a> to see if there is an alternative to see if there is a polyfill for this, but I can't find one. </p>
  
  <p>I call this function using these two:</p>
  
  <pre><code>.sort(sortByProp('key', 'k', a))
            .sort(sortByProp('key', 'n', b));
  </code></pre>
  
  <p>How can I make it so this will work in all browsers?</p>