Difference between JavaScript functions?

Possible duplicate:
what is the difference between the two functions / approaches

I have seen various types of functions posted around, but I cannot find an answer to the differences between them. I know how to write these two, but I don't know the difference.

function aFunction() {

}

var aFunction = function() {

}

      

Then I heard about things like closures, among other names. I am new to programming, sorry, can anyone please tell me all the different types and the differences between them?

+3
javascript function


source to share


No one has answered this question yet

See similar questions:

7
What is the difference between these two features / approaches?

or similar:

7649
How does JavaScript blocking work?
7494
How can I remove a specific element from an array in JavaScript?
7432
How to check if a string contains a substring in JavaScript?
7287
What does "use strict" do in JavaScript, and what are the reasons for it?
6493
var functionName = function () {} vs function functionName () {}
5670
Which operator is equal (== vs ===) should be used in JavaScript comparisons?
4829
How do I include a JavaScript file in another JavaScript file?
4086
What's the difference between using "let" and "var"?
2984
What is the difference between calling and submitting an application?
2256
Set default parameter value for JavaScript function



All Articles
Loading...
X
Show
Funny
Dev
Pics