Example 1 — Read the Platform String
Log whatever this browser reports for navigator.platform.
console.log(navigator.platform);
// e.g. "Win32", "MacIntel", "Linux x86_64" How It Works
- Read the property. No arguments — just access
navigator.platform. - Get a string. Common values include
MacIntel,Win32, and Linux variants. - Windows quirk.
Win32often appears even on 64-bit Windows. - Read-only. You inspect the value; you do not assign to it.

