JavaScript is a scripting language that uses objects. For example, your browser window is an object, which contains the document object. In addition, the window object also contains the navigator object. The navigator object is the browser you are using. We can refer to these objects via JavaScript by using "navigator."
The following includes several properties of the navigator object. These properties are referenced with the following code:
window.navigator.appName - This property gives the application name (Netscape, IE...)
window.navigator.appVersion - This property gives the version of the application.
To simplify the code, we will create variables. Variables are just place holders for values we want to use. For example, x =100, y= 110, name = "Manuel Chagoyan", or myDoc=window.document. Let's use variables to simplify our code.
Here are simplified navigator properties for this page:
<script language="JavaScript" type="text/javascript">
// Create variables
var myBrowserName = window.navigator.appName;
var myBrowserVersion = window.navigator.appVersion;
// The + symbol is used to put text together. It allows you to display javascript values along with text
window.alert("Browser Application Name: " + myBrowserName);
window.alert("Browser Version: " + myBrowserVersion);
</script>