Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of use strict #176

Open
sohilpandya opened this issue Nov 13, 2017 · 1 comment
Open

Usage of use strict #176

sohilpandya opened this issue Nov 13, 2017 · 1 comment
Assignees
Milestone

Comments

@sohilpandya
Copy link
Collaborator

We have a single file passwordModule.js where we are using use strict, What is the reason for using this just in this file?

We should be consistent across the board so something worth thinking about.

@polyccon polyccon added this to the Milestone 4 milestone Nov 15, 2017
@polyccon
Copy link
Collaborator

polyccon commented Nov 23, 2017

Where should I use 'use strict';?

In my new JavaScript application: Absolutely! Strict mode can be used as a whistleblower when you are doing something stupid with your code.
In my existing JavaScript code: Probably not! If your existing JavaScript code has statements that are prohibited in strict-mode, the application will simply break. If you want strict mode, you should be prepared to debug and correct your existing code. This is why using 'use strict'; does not suddenly make your code better.
link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants