When I first started learning JavaScript as a MERN stack developer, one concept that took time to truly understand was callbacks. A callback is simply a function passed as an argument to another function, which is executed after a certain task is completed. This pattern is very common in JavaScript, especially when dealing with asynchronous operations. Example: function greet(name, callback) { console.log("Hello " + name); callback(); } function sayBye() { console.log("Goodbye!"); } greet("Taha", sayBye); Here, sayBye is passed as a callback and executed after the greeting. Callbacks are fundamental to understanding asynchronous JavaScript, and they form the foundation for concepts like Promises and async/await. Have you ever struggled to understand callbacks when learning JavaScript? github: https://lnkd.in/d977yEjj #javascript #webdevelopment #mernstack #coding #softwaredevelopment
Understanding Callbacks in JavaScript
More Relevant Posts
-
Day 51/100 MERN Stack Journey Today I didn’t just use useEffect — I focused on understanding when, why, and how it actually runs. - Explored how useEffect( ) behaves on different renders - Learned dependency-based execution ([a] vs [b]) - Implemented multiple useEffect hooks for cleaner and separate logic - Practiced real user interactions (click, hover, double-click) * Key takeaway: useEffect isn’t just a hook — it’s a powerful way to control side effects precisely. Instead of re-running everything, you decide exactly what should run and when. - One important learning: Incorrect dependency usage can cause unnecessary re-renders or missed updates — something to be mindful of. Small concept, but a big step toward writing better React code. Building consistency one day at a time github link : https://lnkd.in/gXic9JmR #Day51 #100DaysOfCode #ReactJS #JavaScript #MERNStack #FrontendDevelopment #CodingJourney #LearnInPublic
To view or add a comment, sign in
-
Day 3 of my MERN Stack Journey 🚀 Today I focused on JavaScript Functions, Arrays, and Loops, and did a lot of hands-on practice. 🔹 What I built today: Functions for greeting users in different ways Basic calculator functions (add, subtract, multiply, divide) Even/Odd number checker AED to INR currency converter Array operations using push(), unshift(), and pop() Looping through arrays using for loops 🔹 Practice Highlights: Created a small student result system (Pass/Fail) Filtered numbers greater than 10 Printed even numbers from an array Today helped me understand how to combine logic using functions, loops, and conditions. It’s starting to feel more practical now 💻 GitHub : https://lnkd.in/dE2ZxjCt Read More : https://lnkd.in/d6rdQy8H Next step: DOM Manipulation — excited to interact with real web pages 🔥 #MERNStack #JavaScript #CodingJourney #LearnInPublic #WebDevelopment
To view or add a comment, sign in
-
🚀 Learning Update | JavaScript, React & Consistency Here’s what I worked on recently: 🔹 JavaScript Fundamentals Implemented 5 practical examples to strengthen understanding of closures. 🔹 OOP in JavaScript Created a class with constructor and methods, and extended it into a subclass to understand inheritance. 🔹 DSA Practice Solved 4 LeetCode problems to improve problem-solving skills 💪 🔹 React Development Built a React-based form page and understood the advantages of using type="submit" for better form handling. 🔹 Node.js Practice Completed 5 Node.js challenges on HackerRank, improving backend fundamentals. 🔹 Communication Improvement Continued reading The Power of Subconscious Mind to enhance communication 🧠 Small, consistent efforts are building strong foundations. #JavaScript #ReactJS #NodeJS #DSA #LearningInPublic #GrowthMindset
To view or add a comment, sign in
-
Learning JavaScript & React Today I focused on strengthening my core JavaScript concepts and connecting them with React. 🔹 Practiced important array methods: map() → transforming data filter() → selecting data reduce() → combining data into a single value 🔹 Understood async JavaScript: Learned how async/await works Fetched data from API and displayed it 🔹 React Learning: Used useState to store API data Used useEffect to fetch data when component loads Rendered dynamic data using map() => Key Learning: Understanding the difference between map, filter, and reduce was challenging at first, but now it’s much clearer how they are used in real applications. =>Still improving: Writing reduce logic without confusion Thinking independently without looking at reference code This is just the beginning — focusing on consistency and real understanding. #javascript #reactjs #webdevelopment #learninginpublic #frontenddeveloper
To view or add a comment, sign in
-
-
🚀 Day 4 of My 30 Days MERN Stack Journey Today I moved into one of the most exciting parts of JavaScript — DOM Manipulation. 💻 What I practiced: Selecting elements using getElementById and querySelector Handling user actions with addEventListener Updating content dynamically using textContent Basic form input handling 🛠️ Mini Project Built: 👉 A simple Greeting App User enters their name Clicks a button Gets a personalized greeting This helped me understand how JavaScript interacts with real web pages and makes them dynamic. 🔗 GitHub Repo: https://lnkd.in/dKR9TGZK ⚡ Key Learning: DOM is what turns a static webpage into an interactive experience. Consistency is key — learning something new every single day. Read more: https://lnkd.in/duxWQEBD #MERNStack #JavaScript #DOM #WebDevelopment #LearningJourney #Day4 #Coding
To view or add a comment, sign in
-
-
🚀 JavaScript Roadmap: Zero to Hero (12 Weeks) Still confused where to start in programming? Start with JavaScript — the backbone of the web 🌐 I’ve created a simple 12-week roadmap to help students and beginners become job-ready step by step. 📌 What you will learn: ✔ Web Basics (HTML, CSS, JS) ✔ DOM & Events ✔ Modern JavaScript (ES6+) ✔ Frontend (React) ✔ Backend (Node.js) ✔ Database (MongoDB / MySQL) ✔ Full Stack Development ✔ Real Projects & Job Preparation - Beginners with zero coding knowledge - Anyone who wants to build real projects 🔥 Golden Rule: Learn → Build → Fail → Improve → Repeat Don’t just watch tutorials ❌ Start building today ✔ 📍 Sri Pathrakali Digital Solutions, Kalugumalai 🌐 www.goldenwebportal.com #JavaScript #WebDevelopment #Programming #FullStackDeveloper #Coding #Students #CareerGrowth #LearnToCode #GoldenWebPortal #IndiaTech
To view or add a comment, sign in
-
-
Exploring JavaScript fundamentals! As part of my learning journey, I explored different ways to run JavaScript code in real-world environments. Understanding how and where your code executes is an important step for every developer. Here are 3 simple and commonly used ways to run JavaScript code: ✔️ Browser Console – great for quick testing and debugging ✔️ Node.js Terminal – useful for running JavaScript outside the browser ✔️ VS Code Terminal – efficient for development and project-based coding Each method has its own purpose, and learning all three helps build a strong foundation in JavaScript. #JavaScript #NodeJS #WebDevelopment #Coding #MERNStack #LearningJourney
To view or add a comment, sign in
-
-
🚀 Day 13 of #100DaysOfCoding — MERN Stack @ Skill Shikshya Today was all about the DOM — and honestly, it's where JavaScript starts feeling truly powerful! 🌳💡 Here's what I covered today: ✅ The DOM is a tree of nodes that JS can read and modify ✅ querySelector / querySelectorAll — the modern way to select elements ✅ textContent, innerHTML, getAttribute & dataset ✅ style and classList for dynamic styling ✅ createElement, appendChild, insertAdjacentHTML & remove ✅ Traversal: parentElement, children, nextElementSibling, closest() ✅ addEventListener and the event object (e.target, e.preventDefault) Every concept clicked a little more today. The moment you realize you can dynamically build and modify a webpage with just a few lines of JS — that's the magic! ✨ Up next → Day 14: Events Deep Dive, Event Delegation & DOM Patterns 🔥 Grateful for the structured learning at Skill Shikshya — one day at a time, one concept at a time. 💪 #100DaysOfCoding #MERNStack #JavaScript #DOM #WebDevelopment #SkillShikshya #LearningInPublic #FrontendDevelopment #CodingJourney
To view or add a comment, sign in
-
Frontend Learning — Types of Functions in JavaScript (That Every Dev Should Know) Functions are the building blocks of everything we write in JavaScript… -> but not all functions are the same 🔥 Why This Matters Understanding function types helps you: ✔ Write cleaner logic ✔ Manage state better ✔ Avoid bugs (especially with this) 🧠 Pro Insight 👉 In modern React apps: Arrow functions + pure functions = 🔥 combo Higher-order functions power methods like map, filter 🎯 Key Takeaway -> Don’t just write functions… -> Understand their behavior to write better architecture #JavaScript #FrontendDevelopment #WebDevelopment #CodingTips #Functions #CleanCode #Developers #LearnInPublic #DeveloperJourney
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
yes yes sir you are right we practiced it more than anything along with shallow copy and deep copy.