Q:

What is the difference between these function declarations in Javascript?

I am having a hard time understanding what the difference between the following declarations is...
var User = function(name, email) {
  this.name = name;
  this.email = email;
};

and
function User(name, email) {
  this.name = name;
  this.email = email;
};

A:

What I know the very basic difference is var User = function(name, email) is created at runtime, and function User(name, email) will be created at parse time.
adding example
This will work here because name is available when it parsed the file
name();    
function name () {
    console.log('My Name')
}

But this will throw an error called undefined is not a function
But here problem was it won't be declared until it read the line var name = function().
name()
var name = function(){
    console.log('My Name');
}

