title: ES6+ javascript module export options
body: <p>I've seen public exports of ES6 modules done in both of the following ways:</p>
  
  <pre><code>// method 1
  export var getAnswer = function () { return 'forty two'; };
  
  // method 2
  export default function () { return 'forty two'; };
  </code></pre>
  
  <ol>
  <li>Are both of these valid?</li>
  <li>If so, why do they both exist?</li>
  <li>Are there other valid options for module exports using ES6 syntax?</li>
  </ol>
  
  <p>I'm surprised I haven't been able to find the answer with my googlefu.  I'm concerned <em>only</em> with ES6 modules, <em>not</em> CommonJS, RequireJS, AMD, Node, etc.</p>