🚀 Day 3 – Level 3 of my 4 Days JavaScript Challenge! 💡 Today's Topic: Difference between call() and apply() in JavaScript Both are used to set the this context and invoke a function immediately — but the way they pass arguments makes all the difference 👇 🪄 Quick Tip 🔹 Use call() when you already know the exact number of arguments. 🔹 Use apply() when arguments are coming dynamically as an array. #JavaScript #WebDevelopment #CodingChallenge #Frontend #LearnInPublic
"Day 3: Call() vs Apply() in JavaScript"
More Relevant Posts
-
Understanding Hoisting in JavaScript Have you ever wondered how JavaScript can use variables or functions even before they’re declared in the code? 🤔 That’s because of a concept called Hoisting. Hoisting means JavaScript moves variable and function declarations to the top of their scope before code execution. Example 👇 console.log(x); // undefined var x = 10; Here, the variable x is hoisted, but only its declaration, not its value. That’s why you get undefined — not an error. However, let and const behave differently. They are also hoisted but remain uninitialized until their declaration is reached — this period is called the Temporal Dead Zone (TDZ). 📘 Quick Tip: Always declare your variables at the top of their scope to keep your code predictable and clean. #JavaScript #FrontendDevelopment #WebDevelopment #FrontendCountdown #ReactJS #NextJS #TypeScript
To view or add a comment, sign in
-
🚀 Just finished a small JavaScript project! I built a modal window that opens and closes when clicking buttons, the overlay, or pressing the Escape key. 🧠 This helped me understand: - querySelector / querySelectorAll - addEventListener - classList.add() and .remove() - Keyboard events like keydown Check out the full project on GitHub 👇 🔗 https://lnkd.in/euzZQVBA #JavaScript #WebDevelopment #Frontend #LearningInPublic #Makhilens
To view or add a comment, sign in
-
Excited to share the latest in my GenZ JavaScript Series! 🚀 In today's video, we're tackling the absolute foundation of ReactJS: Your First Component. Whether you're new to React or need a solid refresher, this lesson covers functional components, JSX, and best practices for building reusable UI. It's crucial for anyone looking to master modern web development. https://lnkd.in/gUwD-mUq #GenZJavaScript #ReactJS #WebDevelopment #Frontend #Coding #JavaScript #Tutorial #LinkedInLearning #Developer"
GenZ JavaScript: Your First React Component Explained (Functional Components & JSX) 2 November 2025
https://www.youtube.com/
To view or add a comment, sign in
-
JavaScript Closures: It felt abstract — like some mysterious power functions had. 👉 Think of a closure like a backpack your function carries. Inside that backpack are all the variables it had access to when it was created — and even when it travels elsewhere (gets called later), it still remembers what’s inside. That means your function can “remember” things, even after its parent scope is gone. It’s not magic — it’s just JavaScript being smart about memory and context. #JavaScript #ReactJS #LearningInPublic #WebDevelopment
To view or add a comment, sign in
-
💻 JavaScript Fun Today! Here’s what I learned: 🎯 How to use variables (var, let, const) and understand their differences 🎯 How to interact with users using alert() and prompt() 🎯 Playing with strings, numbers, and template literals 🎯 Linking JS files to HTML and using defer for smoother loading 💬 Would love to hear your tips for making JS more interactive and fun! #JavaScript #WebDevelopment #Frontend #JSBasics #100DaysOfCode #LearningInPublic #BuildInPublic
To view or add a comment, sign in
-
-
🚀 Leveling Up My JavaScript Fundamentals! Just revised all the important JavaScript loop types — for, while, do...while, for...in, and for...of. These loops may look similar, but each one solves a different kind of problem efficiently. Understanding when to use which loop makes your code cleaner, faster, and more readable — especially in real projects. 🔥 Sharing this snippet for anyone who wants a quick refresher! #JavaScript #WebDevelopment #Frontend #CodingJourney #LearnToCode #TechCommunity #ReactJS
To view or add a comment, sign in
-
-
🔥 Today I finally understood one of JavaScript’s most mind-bending concepts — CLOSURES! At first, I used to see “closure” and think — what even is that?! 😅 But once I got it, it completely changed how I think about functions in JS. In simple words 👇 A closure is when an inner function remembers and accesses variables from its outer function — even after the outer function has finished running. quick example: function counter() { let count = 0; return function() { count++; return count; } } const add = counter(); console.log(add()); // 1 console.log(add()); // 2 Even though counter() has finished, the inner function remembers count — that’s the magic of closures 🔥 It’s one of those things that makes JavaScript feel alive — functions with memory! #JavaScript #Closures #WebDevelopment #LearningInPublic #FrontendDeveloper #100DaysOfCode #CodingJourney
To view or add a comment, sign in
-
-
🧠Did you know ? Even an empty JavaScript file isn't actually empty. When JS runs, the engine automatically creates: 1) Global Execution Context 2) Global Object (window) 3) this -> points to window in browsers ( In Browsers this === window ) Before a single line of your code executes, memory is allocated and the first execution context is already sitting in the call stack. That is the hidden setup behind every JavaScript program. #Javascript #Webdevelopment #Frontend
To view or add a comment, sign in
-
-
Daily Tip: JavaScript or React — Elevate your skills with 1 practical tip a day. Today's focus: mastering closures in JavaScript to write clean, maintainable code. Pro tip: when a closure closes over a variable, ensure you understand the scope chain to prevent leaks. #JavaScript #React #codingtips #webdev
To view or add a comment, sign in
-
🚀 JavaScript Core Concept: Hoisting Explained Ever wondered why you can call a variable before it’s declared in JavaScript? 🤔 That’s because of Hoisting — one of JavaScript’s most important (and often misunderstood) concepts. When your code runs, JavaScript moves all variable and function declarations to the top of their scope before execution. 👉 But here’s the catch: Variables (declared with var) are hoisted but initialized as undefined. Functions are fully hoisted, meaning you can call them even before their declaration in the code. 💡 Example: console.log(name); // undefined var name = "Ryan"; During compilation, the declaration var name; is moved to the top, but the assignment (= "Ryan") happens later — that’s why the output is undefined. 🧠 Key Takeaway: Hoisting helps JavaScript know about variables and functions before execution, but understanding how it works is crucial to avoid tricky bugs. #JavaScript #WebDevelopment #Frontend #ProgrammingConcepts #Learning #Hoisting #CodeTips
To view or add a comment, sign in
-
More from this author
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
Simple and to the point