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 44: String Methods & Manipulation

📘 Day 44: String Methods & Manipulation

Strings are a crucial data type in JavaScript used to represent text. The language offers many built-in methods for manipulating and analyzing strings effectively.

🔹 Common String Methods

  • toUpperCase() / toLowerCase() – Changes text case.
  • trim() – Removes whitespace from both ends.
  • slice(start, end) – Extracts a portion of a string.
  • replace() – Replaces part of a string with another text.
  • split() – Splits a string into an array.
let name = "  JavaScript Course  ";
console.log(name.trim());
console.log(name.toUpperCase());
console.log(name.slice(2, 12));
console.log(name.replace("Course", "Tutorial"));
console.log(name.split(" "));

🧠 Template Literals

Introduced in ES6, template literals use backticks (`) and allow embedding variables or expressions easily.

let language = "JavaScript";
let topic = "Strings";
console.log(`We are learning ${topic} in ${language}!`);

🧑‍💻 Try It Editor

Comments