简体   繁体   English

JavaScript的幂运算符可在Chrome中使用,但会阻塞Node吗?

[英]JavaScript's exponentiation operator works in Chrome but will choke Node?

The exponential operator in JavaScript is documented , and has the form: JavaScript中指数运算符已记录在案 ,其格式为:

  2 ** 3    // ==> 8, which is 2 to the power 3

but it works in Google Chrome, and choke Node.js? 但它可以在Google Chrome浏览器中运行,并阻塞Node.js吗?

It's an ES7 feature, and only works in Node >7. 这是ES7的功能,仅适用于节点> 7。

See: http://kangax.github.io/compat-table/es2016plus/ for a complete list of browsers 请参阅: http : //kangax.github.io/compat-table/es2016plus/以获取浏览器的完整列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM