The `closed` property contains a Boolean value that indicates if the target `window` object is closed or not.
If the returned value of this property is `true` that means the target browser window is closed. But if the value is `false` it means the browser window is still open.
This method is especially is good for situations where we’ve opened a new browser window programmatically (via methods like open()) and want to keep an eye on when that window is closed.
Note: the method is read-only.
Window closed Property Syntax:
Here, we used the `closed` property in the `isClose()` function to see if the target browser window is closed or not.
- If you’re not familiar with the `open()` method, please check to the related section.
- Refer to the event handler section if you’re not familiar with the `onclick` attribute of the `<button>` tags.