Beginner JavaScript Tutorial – 35 – Associative Arrays




Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts

Original source


41 responses to “Beginner JavaScript Tutorial – 35 – Associative Arrays”

  1. how come when you try to do document.write(bucky); .. nothing happens.. the values blue and hot pockets are not being stored inside the array ? .. it seems like the ["color"] and ["food"] act as properties .. similar to when you do bucky.length .. its just bucky["color"] instead .. ?

  2. why </br> doesnt work in this example?

    <script language = "javascript">

    var laith = new Array();

    laith["dudee"]= "omar";
    laith["boring"]="qutaiba";

    document.write("laith's dudee is "+laith["dudee"] +<br/>+"laith boring friend is "+laith["boring"]);
    </script>

  3. Why do people say that java and javascrip are two different things?
    well ofcourse javascript is used for web designing and java is for applications/softwares. but syntaxes are "pretty much" the same! :/

  4. Array IS an object. It DOES have properties. Do you even know Javascript? On top of that it might help to realize almost everything is an object with a prototype you can attach methods and properties to.

  5. You're only attaching new properties to the Array object, and then assigning values. You're not actually utilizing an array in anyway. You could have done this with ANY object. This literally accomplishes nothing.

    There are no associative arrays in Javascript, and almost everything is an object.

Leave a Reply