Sign in to queue

Description

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. 

Tag:

JavaScript

Embed

Download

Download this episode

The Discussion

  • User profile image
    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?

  • User profile image
    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 ...):

    https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array#Methods

    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:

    http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/

    Hope that helps a little!

  • User profile image
    BobTabor

    Re-opening this closed thread ...

  • User profile image
    HauntedGT

    Thanks for the series!!

     

    Very useful for beginners.

    Angel

  • User profile image
    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 asp.net tutorials over here for free! please

  • User profile image
    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 asp.net tutorial here instead.

  • User profile image
    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.

  • User profile image
    BobTabor

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

  • User profile image
    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: http://pytools.codeplex.com/

  • User profile image
    Bassu

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

  • User profile image
    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

  • User profile image
    Clint

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

  • User profile image
    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.

  • User profile image
    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!

  • User profile image
    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.

  • User profile image
    John​Michaelson

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

  • User profile image
    BobTabor

    @Gandafl1209: Awesome!

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

  • User profile image
    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.

  • User profile image
    BobTabor

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

Add Your 2 Cents