I'm trying to get to grips with JavaScript for more than just simple JQuery DOM manipulation and something is confusing me.
I've been looking through sample code and seen the following two patterns in the same sample which seem to both be equivalent...
var Car = function(){}
var c = new Car();
and
function Van(){}
var v = new Van();
Is there any difference between them? Why would you use one over the other?