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

13 lines
282 B
JavaScript

function Rectangle(x, y, width, height) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
Rectangle.prototype.contains = function(x, y) {
return (this.x <= x &&
x < this.x+this.width) &&
(this.y <= y &&
y < this.y+this.height);
};