A blog on PHP, JavaScript and more Amit Merchant · June 2, 2020 · ⋆ JavaScript There comes a scenario when you might want to check which operating system the device is running.
The navigator object holds the significant amount of device information such as appName, appCodeName, platform, userAgent and so forth. Among all these, you can utilize the userAgent property which holds the information regarding the browser and the operating system it’s running on.
As you can see, it return the information regarding my current browser but most importantly it has also returned the OS.