What is a function? In JavaScript, a function is a named block of code that can be invoked from anywhere within the code. You can pass arguments as parameters, and assign the return value to a variable. The difference between a function, a method, and a sub-routine is basically what programming language is involved. They practically mean the same thing, but different programmers like to argue about the particular technical differences.
Copyright (c) 2013 Rodrigo Silveira http://www.easylearntutorial.com
Original source
6 responses to “Functions & Methods – JavaScript Tutorial for Beginners”
1000 thumbs up! Super helpful.
Finally, an explanation I understood. Thank you.
Thanks! This video was very useful to me
Thank you Sir! It was a real help! And why can't others explain "scope" and "this" this easily?
I've been literally spending weeks trying to understand them… as well as property…
alert(whatIsmyname());
it is not working ,please tell me what is the reason behind it,also please tell me how to call that function inside that object
Thanks, this helps with my concept understanding!