Is there any difference between declaring a Javascript function like this:
function myName(...)
and like this:
var myName = function(...)
I don't believe so, but...
Is there any difference between declaring a Javascript function like this:
function myName(...)
and like this:
var myName = function(...)
I don't believe so, but...
The first is a function declaration
You have given it a name.
It will be hoisted.
The second is a function expression
The way you wrote it, it's anonymous.
It will only be available after the line where it is defined.