Whether or not the programmer decides, the life of the parameters depends on how "important" the object generated by the constructor is. Naturally, if an object is not used anywhere else and cannot be used with it, the garbage collector can distribute it (and not the fact that it will do it), but if it is no longer needed and you should not think about it.
The second method has one big drawback - the getParam1 and getParam2 methods for each generated object are copied (read "different"), in fact this is the price of privacy in javascript, of course, if we are talking about, for example, singleton, simply using these approaches will not be.
Personally, I advise you to use this approach only when it is really necessary. In general, it is much better to use prototypes. (just to avoid copying)
To provide "pseudo-privacy" is usually used about the following approach:
function Foo(a,b){ this._a = a; this._b = b; } Foo.prototype.getA = function() { return this._a; } Foo.prototype.getB = function() { return this._b; }