What is the difference between importing a function expression or a function declaration from a ES6 module?
<p>As I understand it (<a href="http://exploringjs.com/es6/ch_modules.html" rel="noreferrer">see section 16.3.2.1</a>), ES6 allows different syntaxes for function / class export operands. The difference refers to whether the exported function needs to be interpreted at import as a function declaration, in which case you write: <code>export default function () {} // (a)</code> or as a function expression: <code>export default (function () {}); // (b)</code>.</p>

<p>As a possible related sidenote: I read that imports are hoisted, but I'm not really sure what that means in this context.</p>

<p>Taking the case of this example:</p>

<p><code>import foo from 'my_module'; // (c)
</code></p>

<p>As I understand it, the above statement will save my exported function in a <code>foo</code> variable. Is that variable hoisted, or what is, and when?</p>

<p><strong>Most importantly, what is the difference (in terms of setting <code>foo</code>) when <code>my_module</code> exports the function using <code>(a)</code> and when it exports it using <code>(b)</code>?</strong></p>