How to get device information using JavaScript code example Example: javascript get device window.navigator.userAgent