Skip to main content

Featured

🎉 Day 46 — React Mastery Completed (Final Summary & Congratulations!)

🎉 Day 46 — React Mastery Completed (Final Summary & Congratulations!) Congratulations, developer! 👏 You’ve successfully completed the 45-Day React.js Roadmap — from understanding the fundamentals to mastering advanced concepts like Redux, Routing, Testing, and Deployment. 📘 What You’ve Learned ✅ React basics — Components, JSX, Props, and State ✅ Hooks — useState, useEffect, useRef, useMemo, and Custom Hooks ✅ Context API and Redux Toolkit for global state management ✅ Routing with React Router & Protected Routes ✅ Data fetching using Fetch API, Axios, React Query ✅ Advanced Patterns — Compound Components, Render Props, HOCs ✅ Styling — CSS Modules, Styled Components, Theming ✅ Animations, Accessibility, Testing, and Performance Optimization ✅ Deployment on Vercel, Netlify, or GitHub Pages 🧩 Final Project Ideas Now that you’re done, build real-world apps to polish your skills: 📝 Task ...

📘 Day 34: JavaScript Loops

📘 Day 34: JavaScript Loops

Loops are used to execute a block of code multiple times until a certain condition is met. They help reduce code repetition and make your programs efficient.

🔹 Types of Loops

  1. for loop – Runs a block of code a specific number of times.
  2. while loop – Runs as long as the condition is true.
  3. do...while loop – Runs at least once, then repeats while the condition is true.

✅ Example

// For Loop
for (let i = 1; i <= 5; i++) {
  console.log("Number: " + i);
}

// While Loop
let count = 1;
while (count <= 3) {
  console.log("Count: " + count);
  count++;
}

// Do...While Loop
let num = 1;
do {
  console.log("Do-While Number: " + num);
  num++;
} while (num <= 3);

🧠 Practice Task

  • Print numbers from 1 to 20 using a for loop.
  • Display all even numbers between 1 and 50 using a while loop.

💡 Live Code Editor

Comments