[Javascript] Object References
Mike Dougherty
mdougherty at pbp.com
Fri Jun 4 14:30:14 CDT 2004
Given this:
var loTP = (some object)
for (itm in loTP.Area0112) {
loTP.Area0112[itm].prop0 = (something)
loTP.Area0112[itm].prop1 = (something else)
loTP.Area0112[itm].prop2 = (something else)
}
Would it be "better" to reduce the object references to this:
var loTP = (some object)
for (itm in loTP.Area0112) {
var loCurObj = loTP.Area0112[itm]
loCurObj.prop0 = (something)
loCurObj.prop1 = (something else)
loCurObj.prop2 = (something else)
}
Is there a "With" construct? what is the syntax/usage? (does it matter?)
(My question is whether or not there is a reason to reduce the length of the reference, not to ask
about syntax I probably could look up)
More information about the Javascript
mailing list