Different ways to use functions


(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?



The first one is a function.

The second one is a method.


What do you mean by that?