An arrow function expression has a shorter syntax than a function expression and does not have its own this, arguments, super, or new.target. These function expressions are best suited for non-method functions, and they cannot be used as constructors…
ECMAScript规范中对Function的文档描述,我认为是ECMAScript规范中最复杂也是最不好理解的一部分,它涉及到了各方面.光对Function就分了Function Definitions.Arrow Function Definitions.Method Definitions.Generator Function Definitions.Class Definitions.Async Function Definitions.Async Arrow Function Defi…
昨天在网上看到一个很有意思的js面试题,就跟同事讨论了下,发现刚开始很绕最后豁然开朗,明白过来之后发现还是挺简单的,跟大家分享下! 题目如下: var a = Function.prototype.call.apply(function(a){return a;}, [0,4,3]); alert(a); 分析步骤如下: 1.将Function.prototype.call当成整体,call方法是由浏览器实现的本地方法,是函数类型的内部方法 var a = (Function.prototy…