The main problem with getting browsers is that they are not standardized. Different browsers have different capabilities and may not support all the features of a web page.
name var browserName = navigator.appName;
This code line assigns the value of the navigator.appName property to the browserName variable.
var browser = navigator.userAgent; var version = navigator.appVersion;