From the course: JavaScript: Classes

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Strict mode with classes explained

Strict mode with classes explained - JavaScript Tutorial

From the course: JavaScript: Classes

Strict mode with classes explained

- [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 then click on the documentation here and scroll down until you see this here. So strict mode was introduced in ES5, and it is a mode that improved 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…

Contents