I am newbie to javascript and oops. I have a javascript function
function foo(args){
...
}
//mehtod1
var type1=foo(a);
//mehtod2
var type2= new foo(a);
Now my doubt is which will give us more performance mehtod1 or method2
what is the significance of new keyword and what are the advantages over mehtod1?
(sorry if the question already exists and for my poor english)