Beginner JavaScript Tutorial – 29 – Other Ways to Create Arrays

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –






27 responses to “Beginner JavaScript Tutorial – 29 – Other Ways to Create Arrays”

  1. New Bee Avatar

    suppose that i created a bunch of variables and i lost count of them ,and i want to add them to the dynamic array ,how do i do that ?!

  2. TheWindsofWonder Avatar

    Is there a primitive array as there is in Java or is there only an object Array in JavaScript?

  3. kumar jain Avatar

    means that according to third option array may have infinite elements store in it..

  4. Nehanth com Avatar

    I love ur videos.Thanks for such awesome videos.

  5. Chuck Baby Avatar

    hahaha baconator. 😀

  6. Bishwanath Yengkhom Avatar

    hey why you used
    var x=9;
    var tuna=65-54;;

  7. Jap Jap Avatar

    can I add the var tuna or var x in the array ?

  8. B BC Avatar

    Jersey up I'm this bitch boi shout out my murderers in Newark O block , oh blah

  9. Hek ..... Avatar

    I'm still having difficulty defining (dynamic) as in "add items dynamically" in javascript. Would be good to clarify. My first impression is input data can be added in realtime that can define, manipulate, or change, and in this case an array.

  10. Gmoney Mozart Avatar

    ok noob question.

    Why when creating the variable we tell the program we are going to have 3 arrays instead of 2?
    Why doesn't 2 work which would mean 3 including 0 if the program counts from 0?

    Because when we define them we have 3 yet it's 0-2.

    So why does it work this way? Why isn't it constant that we always count from 0 with everything?

  11. Ranjana Sunuwar Avatar

    For what is that x and tuna variable i think those aren't work….

  12. Queen4evernalways Avatar

    Stuff and thangs… Rick Grimes loves this tutorial…

  13. Abhishek Choudhary Khatkar Avatar

    If we can add unlimited names in third method then why to use 2nd method?
    Even if i know i need only 5 elements, whats wrong in using 3rd method to keep it safe side.

  14. Karthik Kasthuri Avatar

    why did you give x=9 ? i believe there is no use of it

  15. 1chocolu Avatar

    I still don't really get what these are used for…

  16. TripJay21 Avatar

    When creating an array can you skip 0 and go straight to one in the 2nd or 3rd method you spoke about

  17. Vincent Ramas Avatar

    I experimented about creating an array and I found out this code actually works. (See below)

    stuff = ["baconator" , "old pumpkins"]; 
    // without declaring the variable stated in this video –> var stuff = new Array();

    So my question is, is there really a difference between the two? : 

    var stuff = new Array();
    stuff [0] = "baconator";
    stuff [1] = "old pumpkins"; 


    stuff = ["baconator" , "old pumpkins"]; 

    Can someone answer me please, thanks! (Sorry for my bad English)

  18. fineas2005 Avatar

    Hey bucky, great awesome tutorials, i was experimenting and this way of writing array actually worked, not using index notation, is it ok?

    var stuff = new Array();

    stuff = ["baconator", "elementor", "necromancer"];


  19. Mo's TV Avatar

    good one, but i think tutorial 28 is easier 

  20. MUZBOZ Games Avatar

    Is an array with many boxes in it called an array of boxen?

    Many much boxen?  😛

    (Brian Regan is a genius).

  21. Ralphunreal Avatar

    How come when i limit an Array to say 3 and then i add a 4th and i document.write the Array, it still includes it? I thought when i put a number inside the array it means you will only have that certain amount and then if you try to add another one it will give an error or something.

  22. Bharat Kumar Gupta Avatar

    small tip: in notepad++ when u copy a line of code, press Ctrl+D, it makes the copy and pastes properly in the next line, and bucky thanks for awesome tutorials!

  23. Lloyd Rivers Avatar

    I have an array with 3 different businesses in an external javascript page. I want people to be able to click on an image that I have in my html page and get the alert pop up message. I want the name of each business in 3 different alert boxes. In other words, when someone clicks on the html image the alert pop up message will come up with the first business in my array, and once they click the ok button the 2nd business will come up in an alert pop up box, etc.  Can you help me out with this one. Thanks in advance.

  24. John Cena Avatar

    so wouldn't be better to create an empty array instead of an assigned number of array? Which method is better?

  25. 爱丽娜 Avatar

    aaaand now I'm watching Brian Regan's standup .. thx a lot lol

Leave a Reply

Your email address will not be published. Required fields are marked *