Menu Home

Getter and Setter

Hi everyone, and welcome to another exciting edition of Boring JavaScript! Today we tackle the ‘get’ and ‘set’ keywords, which creates what are know as ‘getter’ and ‘setter’ routines. A great way to create read-only and write-only properties on objects. Write-only? Absolutely! Using ‘get’ and ‘set’ is a great way to unleash the power of objects and classes, and this blog is a great way to fall asleep. Check it out!