Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

JavaScript Functions - 07

Embed code for this video

Copy the code above to embed our video on your website/blog.

Close

Video format

Option selected may change based on video formats available and browser capability.

Close

Download

Right click “Save as…”

Functions are central to JavaScript, much in the same way classes are central to Object Oriented Programming languages like Visual Basic or C#. In this lesson, Bob demonstrates the basics of creating and calling functions, passing arguments, using the arguments object, and creating function literals as well as anonymous functions.

Tag:

Follow the Discussion

  • RafaelRafael

    great work bob

    you are a very good professor

    tks for your series

  • Tom backTom back

    My video is not wokeing

  • tobtob

    5grgrtbr

  • DavidDavid

    i

  • Thanks for this great series Smiley

  • shahanashahana

    Hi bob,
    your demonstration is really admirable,thanx alot for a really good series.

  • PavloPavlo

    Thanks Bob! You and your team did great job! :)

  • Hi  BobHi Bob

    Thanks Bob! your videos are really good.very nice videos and easily understanding....
    Thanks alot..sharing videos..........

  • function add() {   

    var tempValue = 0;   

    for (1 = 0; 1 < arguements.length; 1++)   

    {

     tempValue += arguements [1];      

    }  

     return tempValue;   

    }

      var myValue = add(1,2,3,4,5);  

     alert (myValue);

    I can not get this piece of code to show up when i save it this is the first exercise that i have done and not been able to work out where I am going wrong. Help!

  • Try spelling argument correctly and you may get it to work...really sorry to have troubled ANYONE with my inability to spell correctly... Very Embarrassed!! I am really enjoying these exercises they're great!

  • @TGWC13: We've all been there.  Smiley  Don't worry ... this is not simple stuff.  It's easy to overlook little things.

    @Rafael:  @MohamedBakr:  @shahana:  @Pavlo:  @Hi Bob:  Thanks for the nice words!  Smiley

  • NicoNico

    @TGWC13 your for loop is wrong. It's i not the number 1


    for (i = 0; i < arguements.length; i++)

    {

    tempValue += arguements [i];

    }

  • NicoNico

    <-- lol Apple logo on MS page


    I forgot to write some nice words ^^

    @Bob thank you very much for your great tutorials. I'm enjoying them very much. I started with the HTML5 & CSS3 Fundamentals and I really enjoyed all the hours "we" spent together :D

    Have you ever thought about going to Hollywood becoming a movie star? You do very well in front of the camera!

    Thanks a lot!

  • @Nico: You're funny.  re: Mac ... I don't think Microsoft hates Apple per se ... Office for Mac is a pretty huge seller.  Smiley  They compete in some ways and partner in others.  It's a complicated relationship ... but I'm not a Microsoft employee and you should ignore whatever I say on the matter.

    And no, probably not going to pursue Hollywood anytime soon.  Not a lot of need for middle-aged gray-hair, overweight dudes on TV.  Smiley  Thanks though .. made me laugh.

  • SalSal

    Nice words!
    Are you saying that an anonymous function is one created and run all at once?
    And, like the function literal, because I haven't given it a name, I can't run it (call it) again?

  • @Sal: Yes, that is a characteristic of an anonymous function, but it's not its only characteristic or benefit.  I was going to try and enumerate them, but once again, Wikipedia does a nicer job than I could do on my own:

    http://en.wikipedia.org/wiki/Anonymous_function

  • shondralynnshondralynn

    Hi Bob,

    I would like to know if it is possible to use Javascript for a Real Estate Website?

  • @shondralynn: Absolutely, I'm betting most real estate sites use it in some capacity ... the question is, what functionality do you need and can JavaScript address it?  That's something only you can answer.

Remove this comment

Remove this thread

close

Comment on the Post

Already have a Channel 9 account? Please sign in