Message from JavaScript discussions

May 2017

— It does


Oh. I remember reading that default args, destructuring isn't supposed to work in strict mode. Maybe I should look it up properly again.

— Oh great, haha

— We also thought so but MDN says the declaration has to be outside the function, but that the function will still run in strict mode

Message permanent page

— I tested and found it was true

— So you can't declare functions like that as strict mode, only the enclosing scope, which in turn makes the function run in strict mode. It's more an issue of the placement of that declaration than anything

Message permanent page

— Yeah....

— The new argument syntax doesn't really affect strict mode, it seems like it ONLY affects TCO and ONLY with the spread operator

Message permanent page

— Since all my js runs in strict I don't mind the enclosing scope being strict :p

— Heh

— Welcome charlenopires

— rodmoreno ?