javascript - Using index to pull items from an object -


if have object items named , ending in sequential numbers:

var theobject = { item1:, item2:, item3:, ...etc }

this method of extracting objects , used in loop not seem work. should work provided rest of function correct?

theobject.item+i

you can theobject['item'+i]. can better using jquery foreach can iterate on keys.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -