A JavaScript behavior where variable and function declarations are moved to the top of their containing scope during compilation. This allows variables and functions to be used before they are declared in the code.
From Middle Dutch 'hijsen' meaning to lift or raise up. The term was adopted in JavaScript to describe how declarations are conceptually 'lifted' to the top of their scope during the compilation phase.
Hoisting is like JavaScript having a really helpful but sometimes confusing assistant who reads your entire script first and makes notes about all your variables at the top! This is why you can call a function before you define it, but it can also lead to surprising bugs with variables.
Complete word intelligence in one call. Free tier — 50 lookups/day.