The JavaScript exception ""use strict" not allowed in function" occurs
when a "use strict" directive is used at the top of a function with
default parameters,
rest parameters, or
destructuring parameters....strict mode , and the entire script or enclosing function is also...