In ES6 strict mode: do function declarations within a block hoist?

John Lenz concavelenz at
Thu Jun 5 08:44:53 PDT 2014

That is to say, is this valid:

if (x) {
  function f() { doSomething() }

The same question applies to class declarations.  I assume that top level
class declarations hoist. (Where is this in the spec?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list