How does hoisting work in JavaScript?
- Assignments are moved to the top of the scope during compilation
- Declarations are moved to the top of the scope during compilation
- Functions are moved to the top of the scope during compilation
- Variables are moved to the top of the scope during runtime
Hoisting in JavaScript refers to the behavior where function declarations are moved to the top of the scope during compilation, allowing them to be used before they are declared.
Loading...
Related Quiz
- What is the main difference between Docker and Kubernetes?
- Your team is growing, and you need to provision new resources frequently. How would Infrastructure as Code help streamline this process and ensure consistency across environments?
- MongoDB stores data in _______ format.
- You're tasked with implementing a many-to-many relationship between two tables in a database. How would you achieve this using SQL?
- What does merging in Git involve?