Files
codeql/javascript/ql/src/LanguageFeatures/examples/InconsistentNewGood2.js
2018-08-02 17:53:23 +01:00

10 lines
164 B
JavaScript

function Point(x, y) {
if (!(this instanceof Point))
return new Point(x, y);
this.x = x;
this.y = y;
}
var p = new Point(23, 42),
q = Point(56, 72);