Welcome to Day 6 of your JavaScript learning journey!
If you're serious about mastering JavaScript, it's essential to understand the lingo — the core concepts that keep popping up everywhere in JS tutorials and documentation.
This article is your cheatsheet of essential JavaScript terminologies explained with examples.
🧠 1. Variable
A variable is a container used to store values in memory.
let name = "Dhanian";
🔧 2. Function
A block of reusable code designed to perform a task.
function greet() {
console.log("Hello!");
}
🌍 3. Scope
Scope determines where a variable is accessible in your code.
- Global Scope
- Function Scope
- Block Scope (with let/const)
⚙️ 4. Execution Context
The environment in which code is executed. There are two main types:
- Global Execution Context
- Function Execution Context
Each context has two phases:
- Memory Allocation
- Code Execution
🧱 5. Call Stack
A stack data structure that keeps track of function calls.
It works on LIFO (Last In, First Out) — the last function pushed onto the stack is the first one to finish.
🔼 6. Hoisting
JS moves declarations (not initializations) to the top of their scope during the memory phase.
console.log(a); // undefined
var a = 10;
🧵 7. Closure
A function that retains access to its lexical scope even when executed outside that scope.
function outer() {
let count = 0;
return function inner() {
count++;
console.log(count);
}
}
const counter = outer();
counter(); // 1
counter(); // 2
🪝 8. Callback
A function passed into another function as an argument to be executed later.
function runTask(callback) {
callback("Task Complete");
}
runTask(console.log);
🔮 9. Promise
Represents a value that may be available now, later, or never.
const promise = new Promise((resolve, reject) => {
resolve("Success!");
});
🕓 10. Async / Await
A cleaner way to work with Promises.
async function fetchData() {
let result = await promise;
console.log(result);
}
👤 11. This
Refers to the object that is currently executing the function.
const user = {
name: "Dhanian",
greet() {
console.log("Hi, I'm " + this.name);
}
};
user.greet();
🔁 12. Event Loop
The mechanism that handles asynchronous code in JavaScript. It works with:
- The Call Stack
- The Task Queue (Callback Queue)
📊 13. Data Types
- Primitive: string, number, boolean, null, undefined, symbol, bigint
- Non-Primitive: object, array, function
♻️ 14. Type Coercion
JavaScript converts values automatically during operations.
"5" + 1 // "51"
"5" - 1 // 4
✅ 15. Truthy and Falsy Values
-
Falsy:
false
,0
,""
,null
,undefined
,NaN
- Everything else is Truthy
🎁 Bonus: Get the Full JavaScript Ebook
Want to dive deeper with 200+ real-world practice projects, examples, and full explanations?
It’s beginner-to-advanced, designed to help you build and master JS step by step.
✅ Next up: Stay tuned for Day 7 → JavaScript Data Types Cheatsheet
Follow me if you're loving this series — let’s build together!
Let me know when you want **Day 7** done!