← Back to Course

🛠️ CRUD Operations Explained

CRUD stands for Create, Read, Update, and Delete. These are the four most common actions programs perform on stored data.

The Four Operations

  • Create adds new data
  • Read looks up existing data
  • Update changes existing data
  • Delete removes data

Example: CRUD in an Array

const tasks = ["Read lesson"];

// Create
tasks.push("Practice loops");

// Read
console.log(tasks[0]);

// Update
tasks[1] = "Practice JSON";

// Delete
tasks.splice(0, 1);

console.log(tasks);

CRUD is not limited to databases. You can apply the same thinking to arrays, files, APIs, and user interfaces.

← Back to Code Foundations