Javascript arrays or objects the difference and how to get the index.
<p>From the below code one can discern that the function menu is called with three parameters.
From the menu function how could one get name or diff name depending on which had called menu?</p>

<pre><code>var menus = {
    name: menu('Control', [
    {
        label: 'Public Class My Robot',
        trigger: true,
        script: 'public class MyRobot extends SimpleRobot\n{\n[[next]]\n}\n',
        helptext: "Beginning fo your program",
        depend: "package edu.team2648.frcEasyJ;"
    }], false),
    diffname: menu('Control2', [
    {
        label: 'Public Class My Robot',
        trigger: true,
        script: 'public class MyRobot extends SimpleRobot\n{\n[[next]]\n}\n',
        helptext: "Beginning fo your program",
        depend: "package edu.team2648.frcEasyJ;"
    }], false),
};
</code></pre>

<p>Also what kind of var is menus? (Array, Object,...?)
What is the difference between the following two snippets of code:     </p>

<pre><code>var test = ["str1","str2","str3","str4"];

var test2 = {id:"str1",id2:"str2",id3:"str3",id4:"str4"};
</code></pre>
