Which ECMAScript 6 features imply strict mode?

The spec says:

  • Module code is always strict mode code.
  • All parts of a ClassDeclaration or a ClassExpression are strict mode code.

The rest are just the known things from ES5, basically every global/eval/function code that begins with the "use strict"; directive. It does work within the new ES6 function kinds (arrow, generator, method syntax) as well.

Leave a Comment