Many JavaScript developers learn call(), apply(), and bind(). But remembering the difference can still be confusing. Here’s the simplest way to remember them 👇 👉 call() → calls the function immediately (arguments one by one) 👉 apply() → calls the function immediately (arguments as an array) 👉 bind() → returns a new function without calling it Once you understand these, 'this' in JavaScript becomes much easier. I wrote a simple beginner-friendly guide explaining 'this' with clear examples. I’ll share the article in the comments. Which one confused you the most when you first learned JavaScript — call(), apply(), or bind()? #javascript #webdevelopment #frontenddevelopment #reactjs
Understanding call(), apply(), and bind() in JavaScript
More Relevant Posts
-
💡How to access keys, values and key-value pairs from object in JavaScript💡 𝗙𝗼𝗿 𝗺𝗼𝗿𝗲 𝘀𝘂𝗰𝗵 𝘂𝘀𝗲𝗳𝘂𝗹 𝗰𝗼𝗻𝘁𝗲𝗻𝘁, 𝗱𝗼𝗻'𝘁 𝗳𝗼𝗿𝗴𝗲𝘁 𝘁𝗼 𝗳𝗼𝗹𝗹𝗼𝘄 𝗺𝗲. #javascript #reactjs #nextjs #webdevelopment
To view or add a comment, sign in
-
-
⚡ Want to Improve Your JavaScript Skills? JavaScript is one of the most in-demand skills in web development 🚀 If you already know the basics, JavaScript 2 is a great next step. 🔗 Check this out: https://lnkd.in/gbm4GJNi 💡 Perfect for: Students Beginners Frontend developers ⚡ Start learning advanced JavaScript concepts today. #javascript #webdevelopment #coding #learning #frontend
To view or add a comment, sign in
-
-
Javascript: Variable naming rules 🚀 New to JavaScript? Your variable names might be breaking the rules! Many beginners start writing JavaScript quickly… but forget that variable naming has important rules. Good variable names make your code clean, readable, and professional. Here are some simple JavaScript variable naming rules every beginner should know: • Must start with a letter, _ (underscore), or $ (dollar sign) Example: name, _count, $price • Cannot start with a number ❌ 1value → Invalid ✅ value1 → Correct • No spaces allowed in variable names ❌ user name ✅ userName • JavaScript is case-sensitive age, Age, and AGE are different variables • Avoid JavaScript reserved keywords ❌ let let = 5; Keywords like let, const, if, class cannot be used as variable names. 💡 Pro Tip: Use camelCase for clean and readable code. Example: userAge, totalPrice, isLoggedIn Clean naming = Clean code. #JavaScript #WebDevelopment #ProgrammingBasics #FrontendDevelopment #LearnToCode #CodingForBeginners #SoftwareDevelopment #JavaScriptTips #CleanCode #DeveloperCommunity
To view or add a comment, sign in
-
-
Advanced JavaScript — Day 3: Timers and Intervals Today I studied one of the most practical topics in JavaScript — setTimeout() and setInterval(). These two functions are everywhere in real-world development. Loading spinners, progress bars, countdowns, auto-sliding carousels, real-time clocks — all of it runs on timers. And today I didn't just learn the theory. I built a working Progress Bar using setInterval() to prove I actually understood it. Here's the full breakdown 👇 📌 setTimeout() 📌 setInterval() 📌 clearInterval() — The Most Important Part 📌 The Progress Bar Project 📌 Why Timers Matter in JavaScript Day 3 of Advanced JavaScript — done. Every project I build makes the concepts stick just a little bit more. That's the whole point. Day 4 tomorrow... #AdvancedJavaScript #JavaScript #Timers #setInterval #setTimeout #100DaysOfCode #LearnInPublic #WebDevelopment #Frontend #CodingJourney #BuildInPublic #ProjectBased #TechLearning
To view or add a comment, sign in
-
-
🚀 JavaScript Fundamentals Series — Part 10 One of the most confusing concepts in JavaScript is this. In this guide I explain: • How this actually works • Why context changes • How call(), apply(), and bind() control function context • Real examples where these methods are useful Once you understand this concept, many JavaScript mysteries suddenly make sense. Full guide 👇 https://lnkd.in/dhG9wJqc #javascript #frontend #webdev
To view or add a comment, sign in
-
JavaScript Tip: What is Promise.allSettled()? If you’ve worked with asynchronous JavaScript, you’ve probably used Promise.all(). But have you explored Promise.allSettled()? Promise.allSettled() takes an array of promises and returns a single promise that resolves after all of them have settled — whether they are fulfilled or rejected. Unlike Promise.all(), it doesn’t fail fast if one promise rejects. What do you get back? An array of results, where each result looks like: { status: "fulfilled", value: result } { status: "rejected", reason: error } Why is it useful? When you want to run multiple async tasks independently When you need to know the outcome of each promise When failures shouldn’t stop other operations Example use case: Fetching data from multiple APIs where some may fail, but you still want all results. Have you used Promise.allSettled() in your projects? How did it help? #JavaScript #WebDevelopment #FrontendDevelopment #AsyncProgramming #Promises #CodingTips #SoftwareDevelopment #100DaysOfCode
To view or add a comment, sign in
-
💡 JavaScript Trick Question: 3 + 2 + "7" In JavaScript, the answer is: 👉 "57" 🔍 Why? 🔹 JavaScript follows left-to-right evaluation and uses type coercion. ⚡ Key Insight : 🔹Once a string enters the expression, everything after that becomes a string operation. "In JavaScript, the moment a string joins the party, numbers stop adding and start concatenating." #JavaScript #WebDevelopment #CodingInterview #Frontend #JSConcepts
To view or add a comment, sign in
-
-
🚀✨ What I learned today in JavaScript 💻 Today I practiced something small but powerful in JavaScript: controlling dropdown menus using "e.stopPropagation()". This helps stop events from bubbling up the DOM when you click inside an element 🔁 — very useful when building dropdowns, menus, and interactive UI components. Example 👇 const plusBtn = document.querySelector(".plus"); const plusMenu = document.querySelector(".plus-menu"); plusBtn.addEventListener("click", (e) => { e.stopPropagation(); plusMenu.classList.toggle("hidden"); }); document.addEventListener("click", () => { plusMenu.classList.add("hidden"); }); Simple concept, but very powerful when building clean UI ⚡ 📚 Learning a little every day and improving step by step. But I have one question… 🤔 Some people say they learned JavaScript in 2 months and mastered it. Please how? 😂😂 Someone should teach me that shortcut. #JavaScript #WebDevelopment #CodingJourney #FrontendDeveloper 🚀
To view or add a comment, sign in
-
🚀 JavaScript Nuggets for Developers Every JavaScript developer should be familiar with these powerful “nuggets” — small but impactful tricks that can significantly improve your coding efficiency and problem-solving skills. I’ve recently learned and started applying these techniques, and they’ve already made a noticeable difference in how I write and understand JavaScript. I highly recommend that fellow developers take the time to explore and master these concepts — they may be small, but their impact is huge. credits - Javascript mastery #JavaScript #WebDevelopment #CodingTips #FullStackDevelopment #DeveloperJourney
To view or add a comment, sign in
-
Most developers are learning the wrong things in the wrong order. You learn HTML - CSS - JavaScript. Then jump straight to React. Then wondering why your apps are broken, slow, and impossible to debug. See the real order nobody teaches: HTML + CSS fundamentals (not copy-paste tutorials) Vanilla JavaScript until it hurts How the browser actually works (DOM, events, rendering) Async JavaScript (promises, fetch, async/await) THEN a framework. Any framework. The shortcut is the long way around. Drop a 👇 below if you've made this mistake.
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
Here is the article: https://saraswathi-mac.medium.com/javascript-call-apply-and-bind-explained-simply-e9ecc2bd5b50 Save this if you want to remember call(), apply(), and bind() easily for JavaScript interviews.