如何判断 javascript chrome 开发工具的版本是 运行?

How to tell what version of javascript chrome dev tools is running?

你会说,"Well it's running the according version to the version of Chrome you're running of course!",但是有没有办法 see/set 你在 Chrome Dev Tools 中使用的 javascript 是什么版本?

我问是因为我试图按照 MDN's const 示例进行操作,但是 const 在 Chrome 开发工具控制台中没有按预期工作。

我正在使用 Chrome 版本 49.0.2623.108 m 并检查了一些实验性设置。

我试图在 Chrome 开发工具控制台中使用 const

const MY_FAV = 7;
undefined
MY_FAV
VM202:2 Uncaught ReferenceError: MY_FAV is not defined(…)(anonymous function) @ VM202:2InjectedScript._evaluateOn @ VM134:878InjectedScript._evaluateAndWrap @ VM134:811InjectedScript.evaluate @ VM134:667
MY_FAV = 20;
20
MY_FAV
20

我今天早些时候在控制台中编写了其他 ES6 东西,比如 ...args,所以不确定为什么 const 现在会这样。

is there a way to see/set what version of javascript you're working with in Chrome Dev Tools?

无论您的浏览器引擎实现什么,真的。

您能看到的最好的可能是 chrome://version/ 处浏览器 JavaScript 引擎的名称和版本,然后您可以将其与 the issue tracker, filtered by version label.[=15= 进行交叉引用]

如果您询问某些功能是否已实现,您最好查看 compatibility tables or searching for the specific features in the issue tracker or other databases