are you learning javascript?

if so, you are like me, you are starting to learn about the benefits of using arrays in your javascript code,

but how do you use it?

to declare an array you can use this example.

var Colors=new Array();

on this code, we declare the array Colors

now that you have told your sytem that there is an array called Colors, you can assign each element, for this example, lets assign a variable to the color red

Colors['red'] = "red";

now we can see if it works, lets use an alert box to show the value of Colors['red']

alert(Lang['red']);

here is all the code:
<script type="text/javascript">
var Lang=new Array();
Lang['red'] = "red";
alert(Lang['red']);
</script>