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 45: Date & Math Objects

📘 Day 45: Date & Math Objects

JavaScript provides built-in objects to handle time, dates, and mathematical operations easily.

📅 Date Object

let now = new Date();
console.log(now);
console.log(now.getFullYear());
console.log(now.getMonth());
console.log(now.getDate());
console.log(now.toDateString());

🔢 Math Object

  • Math.round(4.7) → 5
  • Math.floor(4.7) → 4
  • Math.ceil(4.2) → 5
  • Math.random() → random number (0–1)
  • Math.max() & Math.min()
let randomNum = Math.floor(Math.random() * 10) + 1;
console.log("Random number:", randomNum);

🧑‍💻 Try It Editor

Comments