How Far Can An Object Literal Be Nested?
I have found that it is possible to nest another property within an object literal property. Here is an example of this: var rectangle = { upperLeft : { x : 2, y : 2 }, lo
Solution 1:
Your second sample is fine. When you access:
rectangle.upperLeft.x.min
it correctly returns 2
. What problems do you encounter? Note that there is no theoretical maximum nesting level.
Post a Comment for "How Far Can An Object Literal Be Nested?"