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"