- [Instructor] If you've never heard or aren't quite sure
what strict mode is, we'll go over what it is in a second.
If you do, know that when you declare a class
it is automatically in strict mode
and also all its properties and methods you create for it.
If you know what strict mode is,
feel free to skip to the next video.
If not, I'll explain what strict mode is.
So go in a new browser window
and search for Mozilla strict mode.
And click on the first link here.
And if you scroll down,
you'll get some examples of what strict mode is.
And go for
this section here,
where it says converting mistakes into errors.
Go into this section that has
some really great examples here.
So strict mode was introduced in ES5
and it is a mode that improves
the quality of JavaScript programming practices.
It adds a few items that makes us, as a developer,
more aware of what we do with JavaScript.
For example, it adds some errors as throw errors,
that were silent before.
So we are more aware of certain types of errors
that we didn't have access to before.
It also helps with performance with certain code,
that before was compiling much slower due to their nature.
For example, code that was prone to error
now will throw an error and the developer can review it
to make it better for compilation.
Better code equals better performance.
It prohibits some syntax to be used
in future versions of JavaScript as well.
So if you need more specific examples
of strict mode in action,
look at the documentation on the subject on this site.