What is the use of the 'use strict' directive in JavaScript?
- Enables a stricter parsing mode, catching common coding mistakes and preventing the use of some error-prone features.
- Helps in writing more reliable and maintainable code.
- Declared using
'use strict';
at the beginning of a script or a function.