In JavaScript, the "this" keyword inside an arrow function is defined by its _________ context.
- Global
- Lexical
- Local
- Execution
In JavaScript, the "this" keyword inside an arrow function is defined by its lexical context. Unlike regular functions, arrow functions do not have their own "this" binding, so they inherit the "this" value from the surrounding code block, which is determined by the lexical scope.
Loading...
Related Quiz
- You have a block of code that needs to be executed when multiple conditions are true. Which control structure should be used to optimize the code for readability and performance?
- The _______ method is used to handle errors in Promises.
- What is a practical use of closures in JavaScript?
- How can you add a new item to the beginning of an array?
- To select elements with a specific class name, you should use the __________ method.