Web DOMRect API DOMRect() Constructor
The DOMRect() constructor in DOMRect API is used to create DOMRect object which represents a rectangle. Syntax: let myDOMRect = new DOMRect(x, y, width, height); Parameters: This constructor contains four parameters as mentioned above and described below: x: It sets the x-coordinate of the rectangle