What are the benefits of including 'use strict' at the beginning of a JavaScript source file?

The use strict directive is new in JavaScript 1.8.5 (ECMAScript 5). It is not a statement, but a literal expression, ignored by earlier versions of JavaScript. The short answer here is that use strict is a way to voluntarily enforce stricter parsing and error handling on your JavaScript code at runtime. Code errors that would otherwise have been ignored or would have failed silently will now generate errors or throw exceptions.

What is JavaScript?

JavaScript is one of the three pillars of modern web development along with HTML and CSS. The majority of websites employ it and it is supported by all modern web browsers. It is a high-level, multi-paradigm, dynamic, untyped, object-oriented (prototype-based), imperative and interpreted programming language.