🚨 JavaScript Tricky Question #2 (Hard) What will be the output? 🤯 for (var i = 0; i < 3; i++) { setTimeout(() => { console.log(i); }, 1000); } 💬 Comment your answer 👇 🔁 Follow for daily JS questions #javascript #webdevelopment #frontend #developers #coding #nodejs #reactjs #interviewprep #programming
JavaScript setTimeout Loop Output
More Relevant Posts
-
🚨 𝟗𝟓% 𝐨𝐟 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫𝐬 𝐆𝐞𝐭 𝐓𝐡𝐢𝐬 𝐖𝐫𝐨𝐧𝐠 𝐢𝐧 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭! Let me ask you something 👇 What does "function.length" actually return in JavaScript? Most developers think it counts the arguments passed ❌ But that’s not the full truth. 👉 It only counts the number of parameters defined 👉 And it completely ignores parameters after default values This small concept can easily become an interview trap if you're not clear about it. I’ve explained it with a simple example in this short video 👇 🎥 Watch here: https://lnkd.in/gtqaybpf If you're serious about improving your JavaScript fundamentals, start focusing on these small but powerful concepts. 💡 Because strong basics = strong developer. Comment “YES” if you already knew this, or "NEW" if you learned something today 👇 #javascript #webdevelopment #coding #frontend #nodejs #learnjavascript #programming #developers #softwaredeveloper #tech
JavaScript function.length 🤯 95% Developers Get This Wrong! #javascript
https://www.youtube.com/
To view or add a comment, sign in
-
𝗛𝗧𝗧𝗣 𝗦𝘁𝗮𝘁𝘂𝘀 𝗖𝗼𝗱𝗲𝘀: 𝗧𝗵𝗲 𝘀𝗶𝗹𝗲𝗻𝘁 𝗹𝗮𝗻𝗴𝘂𝗮𝗴𝗲 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝗰𝗹𝗶𝗲𝗻𝘁 𝗮𝗻𝗱 𝘀𝗲𝗿𝘃𝗲𝗿 👨💻 𝗔𝘀 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿𝘀, we see these codes almost every day but understanding them properly saves hours of debugging (and a few emotional breakdowns 😅). 𝗠𝘆 𝗽𝗲𝗿𝘀𝗼𝗻𝗮𝗹 𝗳𝗮𝘃𝗼𝗿𝗶𝘁𝗲? 𝟰𝟬𝟰 – Because sometimes even my motivation is “Not Found.” 😅 𝗔𝗻𝗱 𝟱𝟬𝟬? That one hits differently when the client says: Everything was working yesterday..😂 Mastering status codes means faster debugging, cleaner APIs, and fewer late-night headaches. Which HTTP status code describes your current mood today? 😄 #WebDevelopment #FrontendDeveloper #BackendDeveloper #FullStackDeveloper #ReactJS #NextJS #NodeJS #Laravel #API #Programming #CodingLife #DeveloperHumor #SoftwareDevelopment #HTTPStatusCodes #TechLife #Debugging #JavaScript #PHP #CodeNewbies #Developers
To view or add a comment, sign in
-
-
Hot take 🔥 Choosing between React and Angular is NOT the real problem. The real problem is: ❌ Not understanding JavaScript properly ❌ Not knowing how the web works ❌ Jumping frameworks without fundamentals Frameworks change. But fundamentals don’t. I’ve worked with both React and Angular — and honestly? 👉 Strong basics matter more than the framework. Because once your foundation is strong: Switching tech becomes EASY. Agree or disagree? #ReactJS #Angular #JavaScript #FrontendDevelopment #Programming
To view or add a comment, sign in
-
-
🚀 Node.js vs Express.js — What’s the Differences? 👉 Key Difference: Node.js is the engine 🛠️ Express.js is the toolkit 🧰 that makes development easier #NodeJS #ExpressJS #BackendDevelopment #JavaScript #WebDevelopment #Coding #Developers
To view or add a comment, sign in
-
-
Frontend development isn’t about learning everything… it’s about building the right stack step by step 🚀 Start with the basics → master the tools → build real projects → repeat 🔁 That’s how you go from beginner to pro 💻✨#FrontendDevelopment #WebDevelopment #JavaScript #ReactJS #Angular #VueJS #HTML #CSS #TypeScript #TailwindCSS #Bootstrap #WebDevJourney #CodingLife #Developers #Programmers #GitHub #VSCode #LearnToCode #TechSkills #SoftwareEngineering
To view or add a comment, sign in
-
-
⚠️ React bug that makes you question reality? 😵💫 You update state… but your logic still uses the OLD value 😶 👉 That’s a stale closure. Your function “remembers” outdated state because of how closures work in JavaScript. 💥 Common symptoms: ❌ Counters not updating ❌ Async calls using old data ❌ UI behaving randomly 🚀 Quick fixes: ✅ Use functional updates (prev => ...) ✅ Fix missing dependencies in useEffect ✅ Use refs for always-fresh values 🔥 Thumb rule: Async + state = double check for stale closures 💬 Ever lost hours on this? Share your story 👇 #ReactJS #React #JavaScript #FrontendDevelopment #WebDevelopment #SoftwareEngineering #FullStack #Programming #CodingLife #Developers #DevCommunity #TechCommunity #CodeNewbie #LearnToCode #100DaysOfCode #Frontend #WebDev #JS #ReactDeveloper #SoftwareDeveloper #CodingTips #Debugging #CleanCode #TechTips #BuildInPublic #DEV #Engineering #ProgrammerLife #TechCareer #CodeDaily
To view or add a comment, sign in
-
-
Every developer has that one habit. Which one is yours? • opening 10 tabs while debugging • checking the same code again and again • blaming the API first 😅 • taking a break and magically it works Drop yours 👇 #CodingLife #Developers #JavaScript
To view or add a comment, sign in
-
🔥 Why most developers still don’t understand this in JavaScript… At some point, every JavaScript developer has thought: 👉 "Why is this behaving differently here?" 🤯 You write the same function… but suddenly it works in one place and breaks into another. That’s where confusion starts. 💡 The truth is: this is not about where it’s written… it’s about how the function is called. And that’s exactly what most developers miss. ⚡ Common mistakes: - Assuming this always refers to the current object ❌ - Confusion between arrow functions and regular functions - Ignoring execution context 🎯 Once you understand this, everything changes: Better debugging, cleaner code and stronger fundamentals. 🎥 Watch this (simple explanation): https://lnkd.in/dM5mV_cE 💬 Be honest… did this confuse you when you started? 😄 #JavaScript #WebDevelopment #Coding #Programming #Frontend #NodeJS #ReactJS #Developers #LearnToCode #CodingLife #Tech #SoftwareDevelopment #JavaScriptTips #FullStack #DeveloperCommunity
Why Most Developers Don't Understand "this" in JavaScript | JS OOP Tutorial
https://www.youtube.com/
To view or add a comment, sign in
-
Angular is not slow. But many Angular apps are. The reason? Not the framework. Small mistakes we don’t notice. I wrote 5 simple fixes that can actually improve performance in real projects. Read here: https://lnkd.in/gD-CGvXn #Angular #Frontend #JavaScript #WebDevelopment #Programming
To view or add a comment, sign in
-
-
Angular vs React: Lifecycle made simple 👇 💡 Different syntax, same concepts: initialize, react to changes, cleanup. #webdevelopment #angular #reactjs #frontend #programming #coding #lifecycles #hooks #javascript #softwareengineer
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