Ame*_*icA 5 javascript ecmascript-6 arrow-functions
我正在阅读Execution Context in JavaScript一篇文章,我无疑明白什么是JavaScript.
function Foo() {
// Execution context of Foo function is here, between curly braces
}
Run Code Online (Sandbox Code Playgroud)
我也读到了Arrow Functions它的属性,但是我遇到了一个问题:
箭头函数执行上下文在哪里?
const ArrowFoo = () => {
// Where is ArrowFoo function execution context?
// Is here? or the upper block scope?
// Or global scope?
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
965 次 |
| 最近记录: |