We have many properties in the window object. An object of the window is created automatically by the browser.
Window confirm is used for displays a dialog box with a specified message, along with an OK and a Cancel button.
A confirm box is often used if you want the user to verify or accept something.
confirm("Press the button");
The window focus method is also used to focus the thing in the browsers or website.
Means for example you want to focus on a specific thing or tracking purpose so you can be use window focus.
var myWindow = window.open("", "", "width=200, height=100"); myWindow.document.write("<p>A new window!</p>"); myWindow.focus();
The localStorage is also a window property this is very useful to store data in the browser and sessionStorage properties allow saving key/value pairs in a web browser.
The localStorage object stores data with no expiration date. The data will not be deleted when the browser is closed and will be available the next day, week, or year.
The getComputedStyle() is a very useful property i also use this propety a lot getComputedStyle() is gets all the actual (computed) CSS property and values of the specified element.
I hope you like this also comments about your thoughts.
For more content follow me on Instagram @developer_nikhil27.