mozilla

Compare Revisions

Defining Getters and Setters

Change Revisions

Revision 57921:

Revision 57921 by Blixt on

Revision 57922:

Revision 57922 by Davigoli on

Title:
Defining Getters and Setters
Defining Getters and Setters
Slug:
JavaScript/Guide/Obsolete_Pages/Creating_New_Objects/Defining_Getters_and_Setters
JavaScript/Guide/Obsolete_Pages/Creating_New_Objects/Defining_Getters_and_Setters
Tags:
JavaScript, Firefox, get, set, getter, setter, property
JavaScript, Firefox, get, set, getter, setter, property
Content:

Revision 57921
Revision 57922
t28js> o = new Object;t
29[object Object]
30js> o = {a:7, get b() {return this.a+1; }, set c(x) {this.a = 28js> var o = {a:7, get b() {return this.a+1; }, set c(x) {this.
>x/2}};>a = x/2}};

Back to History