Different Ways to Assign Functions?


#1

There should really be a general questions thread lol.
Is there any difference between:

var functionName = function (parameter){

}

and:

function functionName (parameter){

}

#2

yes this one

function = functionName (parameter){

}

is wrong maybe you want to do

function  functionName (parameter){

}

without the =


#3

Yes, I'm sorry that's what I meant to type. Is there a difference between the two correct versions? (I've edited the post.)


#4

you can read about it here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.