Different ways to use functions


#1

(I'm new to the forums, sorry if this should be in corner bar, but I think because it has to do with the course it belongs here.)
I've noticed how the course uses this way of making functions:

var Lplp = function(hi) {
//code stuff
};

Why is it taught that way, instead of:

function Lplp(hi) {
//code stuff
};

I mean, I use the second one and no errors are returned, and personally I think it is easier. What is the difference, apart from having to type more?


#2

@tagrockstar51523

The first one is a function.

The second one is a method.


#3

What do you mean by that?