我正在通读 ECMA Script 2015 specification .
在 functions
下,我看到:
In addition to its properties, a function contains executable code and state that determine how it behaves when invoked. A function’s code may or may not be written in ECMAScript (emphasis added).
什么情况下函数的代码不能用 ECMA 脚本编写?
最佳答案
执行环境提供的原生函数(如 String
和 Array
类,或 setTimeout
,或浏览器 DOM)经常被用 C 编写(或由其他编写的函数提供支持)。
关于javascript - 函数的非 ECMAscript 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32661777/