JS Learning

JavaScript Glossary - Terms & Definitions

Your comprehensive JavaScript dictionary. Find clear definitions, examples, and related concepts for every JavaScript term you encounter.

This JavaScript glossary is your quick reference for understanding programming terminology. Whether you're reading documentation, following tutorials, or debugging code, use this glossary to clarify any JavaScript terms or concepts you're unsure about.

Found 40 terms

A

Argument

The actual value passed to a function when it is called. Arguments are assigned to the function's parameters.

Example:

greet("Alice", 25); // "Alice" and 25 are arguments

Related Terms:

Array

An ordered list of values. Arrays are objects with special behavior and methods for working with indexed collections.

Example:

const fruits = ["apple", "banana", "orange"];

Related Terms:

Arrow Function

A concise syntax for writing functions introduced in ES6. Arrow functions don't have their own this binding.

Example:

const add = (a, b) => a + b;

Related Terms:

async/await

Syntax for working with Promises more comfortably. async functions return Promises, and await pauses execution until a Promise resolves.

Example:

async function fetchData() {
  const data = await fetch("/api/data");
  return data.json();
}

Related Terms:

Asynchronous

Code execution that doesn't block the main thread. Asynchronous operations allow other code to run while waiting for long-running tasks.

Example:

setTimeout(() => {
  console.log("This runs later");
}, 1000);

Related Terms:

B

Boolean

A primitive data type that can only have two values: true or false. Used for logical operations and conditions.

Example:

const isActive = true; const isComplete = false;

Related Terms:

C

Callback Function

A function passed as an argument to another function, to be executed after some operation completes.

Example:

setTimeout(() => {
  console.log("Delayed message");
}, 1000);

Related Terms:

Class

A template for creating objects with predefined properties and methods. Introduced in ES6 as syntactic sugar over prototypes.

Example:

class Person {
  constructor(name) {
    this.name = name;
  }
}

Related Terms:

Closure

A function that has access to variables in its outer (enclosing) scope even after the outer function has returned.

Example:

function outer(x) {
  return function inner(y) {
    return x + y;
  };
}

Related Terms:

const

A keyword for declaring block-scoped variables that cannot be reassigned. The value must be assigned at declaration.

Example:

const PI = 3.14159; // PI cannot be reassigned

Related Terms:

D

Data Type

A classification of data that tells the JavaScript engine how to interpret and use the data. JavaScript has primitive and reference types.

Example:

typeof 42; // "number"
typeof "Hello"; // "string"

Related Terms:

Destructuring

A syntax for extracting values from arrays or properties from objects into distinct variables.

Example:

const { name, age } = person;
const [first, second] = array;

Related Terms:

DOM

Document Object Model - a programming interface for HTML documents. It represents the document as a tree of objects.

Example:

document.getElementById("myDiv");

Related Terms:

E

Element

An object representing an HTML element in the DOM. Elements can be selected, created, modified, and removed using JavaScript.

Example:

const div = document.createElement("div");

Related Terms:

Event

An action or occurrence that happens in the browser, which JavaScript can respond to (like clicks, key presses, or page loads).

Example:

button.addEventListener("click", handleClick);

Related Terms:

Event Listener

A function that waits for a specific event to occur on an element and executes code in response.

Example:

element.addEventListener("click", function() {
  console.log("Clicked!");
});

Related Terms:

Event Loop

The mechanism that allows JavaScript to perform non-blocking operations by offloading operations to the browser/system when possible.

Example:

console.log("1");
setTimeout(() => console.log("2"), 0);
console.log("3");
// Output: 1, 3, 2

Related Terms:

F

Function

A reusable block of code designed to perform a specific task. Functions are first-class objects in JavaScript.

Example:

function greet(name) {
  return "Hello " + name;
}

Related Terms:

Function Declaration

A way to define a named function using the function keyword. Function declarations are hoisted.

Example:

function calculateSum(a, b) {
  return a + b;
}

Related Terms:

Function Expression

A way to define a function as part of an expression. The function can be anonymous or named.

Example:

const multiply = function(a, b) {
  return a * b;
};

Related Terms:

H

Hoisting

JavaScript's default behavior of moving declarations to the top of their containing scope during compilation.

Example:

console.log(x); // undefined (not error)
var x = 5;

Related Terms:

J

JSON

JavaScript Object Notation - a text format for storing and transporting data. JSON is language-independent but uses JavaScript syntax.

Example:

{"name": "John", "age": 30, "city": "New York"}

Related Terms:

L

let

A keyword for declaring block-scoped variables that can be reassigned. Introduced in ES6 as a replacement for var in most cases.

Example:

let count = 0; count = count + 1;

Related Terms:

M

Method

A function that is a property of an object. Methods can access and modify the object's properties using this.

Example:

const person = {
  name: "Alice",
  greet() {
    console.log(`Hi, I'm ${this.name}`);
  }
};

Related Terms:

Module

A reusable piece of code that exports functionality for use in other modules. ES6 introduced native module support.

Example:

export function helper() {}
import { helper } from "./helper.js";

Related Terms:

N

null

A primitive value representing the intentional absence of any object value. It's often used to indicate "no value" or "empty".

Example:

let data = null; // explicitly set to no value

Related Terms:

Number

A primitive data type representing both integers and floating-point numbers. JavaScript uses double-precision 64-bit format.

Example:

const age = 25; const price = 19.99;

Related Terms:

O

Object

A complex data type that stores collections of key-value pairs. Objects are mutable and passed by reference.

Example:

const person = {
  name: "John",
  age: 30
};

Related Terms:

Operator

A symbol that performs operations on operands. JavaScript has arithmetic, comparison, logical, assignment, and other operators.

Example:

const sum = 5 + 3; // + is the addition operator

Related Terms:

P

Parameter

A variable listed in a function definition. Parameters are placeholders for the values (arguments) that will be passed to the function.

Example:

function greet(name, age) { // name and age are parameters
  console.log(`Hello ${name}`);
}

Related Terms:

Promise

An object representing the eventual completion or failure of an asynchronous operation. Promises can be pending, fulfilled, or rejected.

Example:

const promise = new Promise((resolve, reject) => {
  // async operation
});

Related Terms:

Property

A key-value pair in an object. Properties can hold any type of value, including functions (methods).

Example:

const car = {
  brand: "Toyota", // brand is a property
  year: 2022      // year is a property
};

Related Terms:

Prototype

An object from which other objects inherit properties and methods. Every JavaScript object has a prototype.

Example:

const arr = [];
arr.__proto__ === Array.prototype; // true

Related Terms:

R

Return

A statement that ends function execution and specifies a value to be returned to the function caller.

Example:

function double(n) {
  return n * 2;
}

Related Terms:

S

Scope

The accessibility of variables, functions, and objects in different parts of your code. JavaScript has global, function, and block scope.

Example:

let global = "I'm global";
function myFunc() {
  let local = "I'm local";
}

Related Terms:

String

A primitive data type representing a sequence of characters. Strings can be created using single quotes, double quotes, or backticks.

Example:

const message = "Hello World";

Related Terms:

T

Template Literal

String literals that allow embedded expressions and multi-line strings. Enclosed by backticks (`) instead of quotes.

Example:

const message = `Hello ${name}, you are ${age} years old`;

Related Terms:

this

A keyword that refers to the object that is executing the current function. Its value depends on how the function is called.

Example:

const obj = {
  name: "MyObject",
  getName() {
    return this.name;
  }
};

Related Terms:

U

undefined

A primitive value automatically assigned to variables that have been declared but not initialized, or to missing function arguments.

Example:

let x; console.log(x); // undefined

Related Terms:

V

Variable

A container for storing data values. In JavaScript, variables can be declared using var, let, or const keywords.

Example:

let age = 25; const name = "John";

Related Terms:

Master JavaScript Terminology

Understanding JavaScript terminology is crucial for effective learning and communication in web development. This comprehensive JavaScript glossary covers everything from basic programming terms to advanced concepts, helping you build a solid foundation in JavaScript vocabulary.

Each JavaScript term in our glossary includes a clear definition, practical code examples, and links to related concepts. Whether you're preparing for JavaScript interviews, reading technical documentation, or learning new JavaScript features, this glossary serves as your trusted reference guide.

Why Use This JavaScript Dictionary?

  • Beginner-Friendly: Every JavaScript term explained in simple, understandable language
  • Code Examples: See how each concept works with practical JavaScript code snippets
  • Interconnected Learning: Discover related terms to deepen your JavaScript knowledge
  • Quick Reference: Find JavaScript definitions instantly with search and category filters

Keep this JavaScript glossary bookmarked as your go-to resource whenever you encounter unfamiliar terms. Regular reference to these JavaScript definitions will help reinforce your understanding and make you a more confident JavaScript developer.