Different Ways to Assign Functions?


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

var functionName = function (parameter){



function functionName (parameter){



yes this one

function = functionName (parameter){


is wrong maybe you want to do

function  functionName (parameter){


without the =


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.)


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


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