Glossary term
What is function declaration? Meaning for developers
function square() { … } written as a statement. Fully hoisted: the whole body is in memory before line 1 runs.
Learn it properly · JavaScript CoreLesson 1: How JS Works: The Execution ContextEverything in JavaScript happens inside an execution context. How the global one is created — memory phase first, then code phase — and why that order explains almost everything that follows.