moveBy() method can be used to move a window on the scree from one location to another.
A negative number will move the window to the left and to the top, and a positive number will move the window to the right and to the bottom.
Let’s modify the
newpage.html again and add a button that can move the window by a number of pixels of your choice.
Since the button is still on the page, you can move the window again and again. It will work as long as it is pressed.