navigator.userAgent


navigator.userAgent 只读属性返回包含运行时名称和主要版本号的用户代理信息。

【The navigator.userAgent read-only property returns user agent consisting of the runtime name and major version number.】

console.log(`The user-agent is ${navigator.userAgent}`); // Prints "Node.js/21"