The navigator object provides information about the browser and device.
console.log(navigator.userAgent); // Browser info
console.log(navigator.language); // "en-US"
console.log(navigator.onLine); // true/false
console.log(navigator.cookieEnabled);
Avoid user agent sniffing for feature detection. Use feature detection instead.