1

Is it possible to refer to another field in an object expression in javascript?

Those ways are not possible:

{ a:3, b:a+7 } // a is not defined
{ a:3, b:this.a+7 } // b === NaN
citykid
  • 9,916
  • 10
  • 55
  • 91

0 Answers0