Quantcast
Channel: Answers by "murkantilism"
Viewing all articles
Browse latest Browse all 99

Answer by murkantilism

$
0
0
Don't use *new Array()*, try this instead: // Declare an empty array using array literal notation var selectedUnits = []; To access any element in the array, say the sixth element, do: selectedUnits[6]; So for example if you wanted to save the sixth element of the array & print the value: unitSix = selectedUnits[6]; Debug.log(unitSix); Take a look at [this tutorial](http://freewebdesigntutorials.com/javaScriptTutorials/jsArrayObject/declareAnArray.htm) for more info on arrays.

Viewing all articles
Browse latest Browse all 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>