Core Git Commands

🧱 1. Repository Setup Purpose: Start tracking a project with Git. CommandDescriptionExamplegit initInitialize a new Git repository in your current folder.git initgit clone <repo_url>Copy an existing remote repository to your local machine.git clone https://github.com/user/project.git Tip:After cloning, you already have a .git folder — no need to run git init again. 🧩 2. Checking Status…

0 Comments

CrudRepository, PagingAndSortingRepository, and JpaRepository

Let’s break down the difference between CrudRepository, PagingAndSortingRepository, and JpaRepository clearly — because they are related but not identical. 🧩 1. Common Ground All three are interfaces provided by Spring Data JPA to abstract database operations. They are hierarchically related, meaning: JpaRepository ⟶ PagingAndSortingRepository ⟶ CrudRepository JpaRepository ⟶ PagingAndSortingRepository ⟶ CrudRepository So each higher…

0 Comments

OOP in Js

⚙️ 2. Creating Classes A class is a blueprint for creating objects. class Person { constructor(name, age) { this.name = name; this.age = age; } greet() { console.log(`Hello, my name is ${this.name} and I'm ${this.age}.`); } } class Person { constructor(name, age) { this.name = name; this.age = age; } greet() { console.log(`Hello, my…

0 Comments

Destructuring arrays & objects

🧩 1. What Is Destructuring? Destructuring means “unpacking” values from arrays or properties from objects into distinct variables. Instead of doing this: const user = { name: "Alice", age: 25 }; const name = user.name; const age = user.age; const user = { name: "Alice", age: 25 }; const name = user.name; const age…

0 Comments

Optional Chaining (?.)

🧩 1. What Is Optional Chaining? Optional chaining (?.) lets you safely access nested object propertieswithout causing an error if something in the chain is null or undefined. 👉 It returns undefined instead of throwing an error. 🧱 The Problem (Without Optional Chaining) const user = {}; console.log(user.profile.name); // ❌ TypeError: Cannot read properties…

0 Comments

Spread (…) and Rest (…)

Let’s go step-by-step through the Spread (...) and Rest (...) operators in modern JavaScript. 👇 🧠 What They Are Both use the same ... syntax — but their behavior depends on where you use them: OperatorActionContextSpread (...)Expands elementsUsed when passing, copying, or mergingRest (...)Collects elementsUsed when receiving or destructuring 🔹 1. The Spread Operator…

0 Comments

Vue Instance

In Vue 3, this concept is expressed using the createApp() function — it’s how you initialize and mount your application. 🧩 What is the Vue Instance (App)? A Vue instance (or app) is the root of your Vue project.It’s the object that: Holds your app’s data, methods, and components. Controls what gets rendered to…

0 Comments

import/export modules

🧩 1. What Are Modules? Modules allow you to split code into separate files and reuse functionality. Each file is a module. Modules can export values (variables, functions, classes) and import them in other files. Benefits: Better code organization Avoid global scope pollution Reusable and maintainable code 🟢 2. Exporting 🔹 Named Exports You…

0 Comments

var, let, and const in JavaScript

🧩 1. var Old way to declare variables (ES5 and earlier). Function-scoped: Available throughout the function where it’s declared. Hoisting: var declarations are hoisted to the top of their scope and initialized as undefined. Can be redeclared and reassigned. 🔹 Example function exampleVar() { console.log(a); // undefined (hoisted) var a = 10; console.log(a); //…

0 Comments

Event Listener

🧩 1. What is an Event Listener? An event listener is a function that waits for a specific event to happen on a DOM element and executes a callback when it occurs. Common events include: click → mouse click input / change → form fields keydown / keyup → keyboard submit → form submission…

0 Comments

End of content

No more pages to load