One thing to note is that you do not need to add "use strict"; when writing a module (Common JS or ES Module) as it's strict by default.
"use strict";
"In the CommonJS module system, a hidden function wraps each module and limits the scope of a “global” strict mode directive.
In ECMAScript modules, which always have strict mode semantics, the directives are unnecessary." (See eslint.org/docs/rules/strict)
Thanks for sharing this.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One thing to note is that you do not need to add
"use strict";
when writing a module (Common JS or ES Module) as it's strict by default."In the CommonJS module system, a hidden function wraps each module and limits the scope of a “global” strict mode directive.
In ECMAScript modules, which always have strict mode semantics, the directives are unnecessary." (See eslint.org/docs/rules/strict)
Thanks for sharing this.