JavaScript · Junior · Question 16 of 75
How does an arrow function differ from a regular one?
- ✓Correct answer: It has no own
thisorargumentsand can't be called withnew - 2It always runs asynchronously, while a regular one runs synchronously
- 3It is fully hoisted, while a regular function is not
Explanation
An arrow takes this from the scope where it was created, which makes it handy for callbacks inside methods. But it doesn't work as an object method: this won't point to the object. Only function declarations are fully hoisted.