HTML DOM Window navigator Property
HTML DOM Window navigator property is used to return a Navigator object. This Navigator object contains methods and properties of the application which is run the script.
var nav = window.navigator;
Return Value: A Navigator Object.
Example: This example shows how to get the Navigator Object of the document using this property.
Before Clicking the Button:
After Clicking the Button: In the console, the navigator object can be seen.
- Google Chrome