on-internet
← Community

JavaScript question about dynamically accessing/assigning array properties [duplicate]

Stack Overflow ·

I need some help with concatenating in JavaScript. I've got an array. The value of its property: (args['type']) is TERRAIN. In another array, I've got: var myOptions = { zoom: parseInt( args['zoom'] ), center: latlng, mapTypeId: }; I want to set mapTypeId to google.maps.MapTypeId.TERRAIN (by using whatever value is held in args['type'] instead of hardcoding TERRAIN ). How do I concatenate it in this situation?

Comments

Sign in or sign up to comment and upvote.

No comments yet.