Previous Lecture Complete and continue  

  ES5 - Getters & Setters

Video Summary

Getters and Setters in Javascript are not new, but have only recently gained popularity in practical use since they were are supported on legacy browsers like IE8.

What they are:

- get is a property that enables you to dynamically retrieve the value of properties based on the internal state of the object

- set is the opposite and enables you to dynamically set the state of an internal property for an object.

Why they're valuable:

Getters and Setters allow you to dynamically generate properties based on the current state of the object and to dynamicaly modify the values of an objects properties by setting them.