1

I was wondering. If I create functions in JavaScript, they're like this:

function myFunc(param){
 //Something to do
}

However, I also see tutorials where they create functions like:

var myFunc = fucntion(param){
 //Something to do
}

Is there a difference between the two and what are the pros and cons?

Guido Visser
  • 2,209
  • 5
  • 28
  • 41

0 Answers0