JavaScript
Topics
Click any topic to open its full article.
1
What is JavaScriptA high-level, interpreted language that makes web pages interactive — runs in the browser and on the server via Node.js.
›2
How JS WorksJavaScript is single-threaded and non-blocking — it uses an event loop to handle async tasks without freezing the page.
›3
What happens when you run a JS codeThe engine parses your code into an AST, compiles it to bytecode, creates an execution context, and runs it line by line.
›4
What is JS EngineA program (like V8 in Chrome) that reads, compiles, and executes your JavaScript code.
›5
What is Call StackA LIFO structure that tracks which function is currently running — each call is pushed on, each return pops it off.
›6
How Call Stack WorksEvery function call adds a frame to the top of the stack. When the function returns, the frame is removed and execution continues.
›7
Hoisting in JSDeclarations are moved to the top of their scope before code runs — var is hoisted and initialised as undefined, but let and const are not.
›8
Scope in JSScope controls where a variable can be accessed — global, function, and block scope with the scope chain.
›9
How variables work in JSvar, let, and const differ in scope, hoisting, and reassignability — choosing the right one prevents most common JS bugs.
›10
How functions work in JSFunctions are first-class objects — they can be stored in variables, passed as arguments, and returned from other functions.
›