Can the arrow function get the event parameters when listening to events?
滿天的星座2017-05-19 10:16:46
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.
仅有的幸福2017-05-19 10:16:46
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
过去多啦不再A梦2017-05-19 10:16:46
There is no arguments object in the arrow function. If you want to get the set of actual parameters, you need to use rest
高洛峰2017-05-19 10:16:46
Of course, the arrow function only affects the execution context, and the parameters of function
will not be affected.