Message from JavaScript discussions

May 2017

— However, simply removing complex args made the functions strict mode instantly

— 

Be warned! Functions that:
1. Have default parameters ( function (a = 1) { )
2. Have destructuring ( function ({ a }) { )
3. Have spread operators ( function (...a) { )

can never be strict mode functions (also applies to arrow functions)

— Https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Strict_Non_Simple_Params

— Use strict will TRY to inherit to child functions, but will fail silently and turn them into non-strict functions for these cases

Message permanent page

— Admin might want to remove this.

— Yup

— I don't think that's neccesarily the case

— The quality of information is questionable but it appears the error has to do with the position of the strict mode declaration, not the function itself

Message permanent page

— This statement makes me think that: "If the function should be in strict mode, and the entire script or enclosing function is also okay to be in strict mode, you can move the "use strict" directive outside of the function"

Message permanent page

— Which amounts to forcing you to use strict mode outside the function in order to use it inside the function

Message permanent page

— It's provable

— TCO only works for strict mode functions