# Why is "use strict" prohibited in functions with non-simple parameters?

**URL:** <https://es.discourse.group/t/why-is-use-strict-prohibited-in-functions-with-non-simple-parameters/1396>\
**Category:** I have questions\
**Created:** [July 14, 2022, 1:14am UTC](https://es.discourse.group/t/why-is-use-strict-prohibited-in-functions-with-non-simple-parameters/1396 "2022-07-14T01:14:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh-Cena](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/josh-cena/32/1408_2.png) [@Josh-Cena](https://es.discourse.group/u/Josh-Cena)\
**Post date:** [July 14, 2022, 1:14am UTC](https://es.discourse.group/t/why-is-use-strict-prohibited-in-functions-with-non-simple-parameters/1396/1 "2022-07-14T01:14:02Z")

</div>

What's the rationale for making this code a syntax error?

```nohighlight
function foo(a = 1) {
  "use strict";
  console.log(a);
}

```

---

<div class="post-metadata">

**Author:** ![bergus](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/bergus/32/152_2.png) [@bergus](https://es.discourse.group/u/bergus)\
**Post date:** [July 14, 2022, 1:55am UTC](https://es.discourse.group/t/why-is-use-strict-prohibited-in-functions-with-non-simple-parameters/1396/2 "2022-07-14T01:55:33Z")

</div>

[This reddit thread](https://www.reddit.com/r/webdev/comments/v877zq/why_cant_you_use_strict_in_function_with/) points to [tc39-notes/july-29.md at 4c6534b52ca829f74ed75e4fe78b74f5a55dc0bf · rwaldron/tc39-notes · GitHub](https://github.com/rwaldron/tc39-notes/blob/4c6534b52ca829f74ed75e4fe78b74f5a55dc0bf/meetings/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists)

---

<div class="post-metadata">

**Author:** ![Josh-Cena](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/josh-cena/32/1408_2.png) [@Josh-Cena](https://es.discourse.group/u/Josh-Cena)\
**Post date:** [July 14, 2022, 2:21am UTC](https://es.discourse.group/t/why-is-use-strict-prohibited-in-functions-with-non-simple-parameters/1396/3 "2022-07-14T02:21:49Z")

</div>

I see, thanks!

I wasn't aware that the parameter list is evaluated with the strictness of the body. But considering that

```nohighlight
function foo(x, x) {
  "use strict";
}

```

Is an error, I can see the motivation.
