javascript, jquery idk -


i got array:

backgrounds:         {         bc2:     '/images/layout/images/backgrounds/bc2.jpg',         codmw2:  '/images/layout/images/backgrounds/codmw2_6.jpg',         bf2:     '/images/layout/images/backgrounds/bf2.jpg',         bf2142:  '/images/layout/images/backgrounds/bf2142.jpg',         codbo:   '/images/layout/images/backgrounds/codbo.jpg',         cod5waw: '/images/layout/images/backgrounds/cod5waw.jpg'        } 

and want access backgrounds[0] = '/images/layout/images/backgrounds/bc2.jpg'. possible or need create array in way?

in case, backgrounds object, i.e., associative array. can't use numerical indexes access members. can iterate through using for( var prop in backgrounds) or can address members directly (backgrounds.bc2 or backgrounds['bc2']).


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -