Javascript Fundamentals: Development for Absolute Beginners

JavaScript Arrays - 08

Download this episode

Download Video


You can think of arrays as variables that hold other variables. In this lesson, Bob demonstrates how to create, initialize, and retrieve elements of arrays using indexes. He also demonstrates how to loop through all elements in an array (foreshadowing the topic of the next lesson) and how to create associative arrays. 





Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • Jeremy

      It took me a few minutes to get the LOST reference. Nice touch.
      Am I correct in assuming that these arrays are mutable?
      What type of methods accompany arrays? That is, can you append and pop, as in Python?
      Are associative arrays basically a dictionary?

    • BobTabor

      @Jeremy: Smiley  Arrays in JavaScript are mutable lists with a few built-in methods.  There are a bunch of methods ... reverse, join, shift, unshift, pop, slice, splice and sort ... here's a good list (I hope posting a link to Mozilla doesn't get me in trouble ...):

      As far as Python is concerned ... sorry ... never used Python ... if I live long enough, I'll get to it one day.  Smiley

      re: Are associative arrays basically a dictionary?

      Hmm... now **that** I don't know for sure, with regards to how they're implemented internally.  They sure look like how you would interact with a dictionary, though.  "If it walks like a duck ..."  Nonetheless, here's an article warning you about the dangers of associative arrays:

      Hope that helps a little!

    • BobTabor

      Re-opening this closed thread ...

    • HauntedGT

      Thanks for the series!!


      Very useful for beginners.


    • BobTaborFan

      Hi Mr. Bob Tabor i am your biggest fan! Man you rock! I really love the way you demonstrate all this stuff in a brilliant way! keep up the good work!
      My next target after learning HTML5,CSS3 and JavaScript is .Net, i searched a lot of tutorials but didn't come across a single one as impressive as the one you have uploaded on this site. It is my request to you to kindly upload your tutorials over here for free! please

    • BobTabor

      @BobTaborFan: Hi ... great user name.  Tongue Out  Thank you for the really nice encouraging words.  Unfortunately, I'm probably not going to post ASP.NET videos here on this website.  I'm going to start cranking new out brand new tutorial here instead.

    • sumanth

      Hi Bob, How can i download these videos . so that it will be easy for me to see when ever i get doubt. please help me.

    • BobTabor

      @sumanth: Hi, I don't think Channel9 supports this feature.  Sorry!

    • Bassu

      I learned great deal of JS from your videos, Bob. Your illustrations combined with camera expressions work like magic ;)

      For Python, I guess, you really should try it some time. You'll either love it or hate it. But people coming off from a statistically typed language experiece, tend to enjoy it :D

      There's even an IDE extension for Visual Studio:

    • Bassu

      Javascript (the good parts) is similar to Python in some ways but in Python you type far less and get more :-D

    • Clint

      @sumanth: Hey, you'll see a list of things like High Quality MP4  below the video, those are links so you can download the video

    • Clint

      @Bassu: yes but Python isn't there as a default for web site development.

    • Raju Golla

      while going through this tutorial just noticed that its been a year since this tutorial is recorded on 6th August 2012.

      Bob Tabor is best tutor and makes the difference.

    • BobTabor

      @Raju Golla: Happy anniversary!  Actually, it was recorded before that date, but that's when it was published.  Still, nice catch.  Smiley  Glad you like the videos!

    • Gandafl1209

      Thank you so much for doing this series! I've really enjoyed working with them. I like the way you walk through everything in detail. Going slow. I'm able to follow along very well.

    • John​Michaelson

      Haha the candidates, I love you man, always giving great examples

    • BobTabor

      @Gandafl1209: Awesome!

      @JohnMichaelson: Yeah, just having a little fun.  Smiley

    • jasmin17

      A happy New Year,Mr. Tabor!

      You clear everything up so well! I'm interested in a such awesome explanation of Yours, regardings the callback functions.Can I find it somewhere?

      Many thanks for this one.

    • BobTabor

      @jasmin17: No, I haven't created such a topic.  Good suggestion, though.  Good luck!

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.