2 ms·
The biggest reason for using "new" in my practice is to keep the value of the "this" keyword on the instance within the function scope. Ihave to agree with the
by gibbitz 12y ago
The biggest reason for using "new" in my practice is to keep the value of the "this" keyword on the instance within the function scope. Ihave to agree with the other commenters here. We all know JavaScript isn't OO. I just wish OO programers would stop trying to force their concepts and patterns on it. It makes maintenance a nightmare for those who didn't write it and didn't code Java/C#/Lisp or whatever OO language their concept originated in before picking up JavaScript.