title: Is this a valid example of a piece of code changing from a statement to an expression because the syntax of the code has changed?
body: <pre class="lang-js prettyprint-override"><code>function f() {return 5;}; 
  var x = f();
  </code></pre>
  <p>The execution of a function statement by itself (<code>f()</code>) is an <a href="https://stackoverflow.com/questions/63174636/is-my-understanding-of-expression-statements-correct">expression statement</a>. However, in the code snippet above (<code>var x = f();</code>), is the <code>f()</code> part of the code no longer an expression statement - and therefore just an expression - because statements can’t appear where expressions are expected?</p>