Is there any difference between creating a Task constructor with a var vs just a function?
function Task(name, priority, timeout){
this.name = name;
this.priority = priority;
this.timeout = timeout;
this.completed = false;
}
var task1 = new Task("firsttask",10,70s);
Versus
var Task = function(name, priority, timeout){
this.name = name;
this.priority = priority;
this.timeout = timeout;
this.completed = false;
}
var task1 = new Task("secondtask",20,30s);