JavaScript Functions - 07
- Posted: Aug 06, 2012 at 10:29 AM
- 36,076 Views
- 18 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
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.
Already have a Channel 9 account? Please sign in
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
great work bob
you are a very good professor
tks for your series
My video is not wokeing
5grgrtbr
i
Thanks for this great series
Hi bob,
your demonstration is really admirable,thanx alot for a really good series.
Thanks Bob! You and your team did great job! :)
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.
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!
@TGWC13 your for loop is wrong. It's i not the number 1
for (i = 0; i < arguements.length; i++)
{
tempValue += arguements [i];
}
<-- 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.
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.
Thanks though .. made me laugh.
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
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