1. Cannot be used arguments对象,在箭头函数内不存在这个对象,如果要是使用,可以使用rests也就是 ... 2. The this object in the function body is the object where it is defined, not the object where it is used. This in an arrow function always refers to the object where the function definition takes effect. 3. It cannot be used as a constructor, that is to say, the new command cannot be used, otherwise an error will be thrown. 4. The yield command cannot be used, so the arrow function cannot be used as a generator function.
The arrow function does not have its own this. This is determined when the arrow function is defined. The this of the arrow function is the this of the object containing the arrow function, while the this of the ordinary function is determined when it is called. Whoever calls this is who
1. Cannot be used
arguments
对象,在箭头函数内不存在这个对象,如果要是使用,可以使用rests
也就是...
2. The this object in the function body is the object where it is defined, not the object where it is used. This in an arrow function always refers to the object where the function definition takes effect.
3. It cannot be used as a constructor, that is to say, the new command cannot be used, otherwise an error will be thrown.
4. The yield command cannot be used, so the arrow function cannot be used as a generator function.
The arrow function does not have its own this. This is determined when the arrow function is defined. The this of the arrow function is the this of the object containing the arrow function, while the this of the ordinary function is determined when it is called. Whoever calls this is who
There is no arguments object in the arrow function. If you want to get the set of actual parameters, you need to use rest
Of course, the arrow function only affects the execution context, and the parameters of
function
will not be affected.It can be completed
You will know after you try it