Arrow functions are not suitable for defining _________ functions.
- async
- generator
- anonymous
- recursive
Arrow functions do not work well for defining generator functions. Generator functions use the function* syntax and rely on the yield keyword, which doesn't behave as expected in arrow functions. Therefore, the correct option is generator.
Loading...
Related Quiz
- Which of the following is NOT a state of a Promise?
- How does JavaScript support lexical scoping?
- Which method is commonly used to change the text content of an HTML element using JavaScript?
- How does the ‘this’ keyword behave differently when used inside a function declaration versus a function expression?
- You are developing a function that needs to maintain state between calls without using global variables. Which JavaScript feature would you utilize to achieve this?