Stats

81 Contributors: 4 Tuesday, May 9, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Setters and Getters

Introduction

Setters and getters are object properties that call a function when they are set/gotten.

Remarks

An object property cannot hold both a getter and a value at the same time. However, an object property can hold both a setter and a getter at the same time.

Related Examples