Diferent ways to define a function in javascipt
//function declaration
function myFunction() {
statements
}
//function expression
var myFunction = function() {
statements
}
//named function expression
var myFunction = function namedFunction(){
statements
}
//IIFE (Immediately Invokable Function Expression)
(function() {
statements
})();