Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Do pro programmers code with strict mode on ? Can you explain strict mode?
Jennifer NordellTreehouse Teacher
delete myFunction), nor a variable, you cannot delete a prototype from an object and a multitude of other things. This is entirely for security reasons and to help keep you from inadvertently doing something with your code that you never meant to do.
Hope this helps!
- Yes, people do use strict mode in a production environment, because JS gives too much freedom and something would cause problems.
- one of the main reason is that it forces you to declare the variable before actually using it. And it will remind you to put var in front, therefore, it helps not to mess up with the scope.
- ESLint is also recommended in production environment