Quick JavaScript Quiz 👇 You run a heavy synchronous loop for 5 seconds that blocks the main thread. During that time, you click a button 10 times. What happens? A) Clicks are ignored B) Only the last click runs C) All clicks execute after the loop finishes D) The browser crashes Drop your answer before scrolling. (Explanation in comments.) #JavaScript #WebDevelopment #Frontend #Learning
JavaScript Synchronous Loop Blocking Main Thread
More Relevant Posts
-
While learning JavaScript, I wanted to understand the actual flow of asynchronous operations. This simple diagram shows the sequence from fetch() to Promises, async/await, error handling with try/catch, and finally organizing code using ES Modules. I learned these concepts from Devendra Dhote bhaiya and tried to visualize the flow in a simple way. Breaking concepts into small visual steps makes asynchronous JavaScript much easier to understand. #javascript #webdevelopment #frontend #learninginpublic #sheryians
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
-
-
🚀 Built a simple "Guess the Number" Game using HTML, CSS, and JavaScript. Features: • Random number generation • Score tracking • Reset functionality This project helped me practice DOM manipulation and JavaScript logic. 🔗 Live-demo : https://lnkd.in/gDSVgTfT #JavaScript #WebDevelopment #Frontend #Learning
To view or add a comment, sign in
-
learned something interesting. I’ve been using ?. in my JavaScript code quite often to safely access nested properties, but today I realized it’s actually called Optional Chaining. const city = user?.address?.city; Small feature, but it saves us from many undefined errors. Learning something new even from things we already use daily is always satisfying. #javascript #webdevelopment #frontenddevelopment #learning
To view or add a comment, sign in
-
Day 8 of #100DaysOfCode Built a Stopwatch using JavaScript. Features: ⏱️ Start / Stop functionality. 🔄 Reset timer 📊 Real-time time tracking Continuing to improve my JavaScript fundamentals through small projects. Git-Hub Repo Link: https://lnkd.in/geZqCnQ9 #JavaScript #WebDevelopment #Frontend
To view or add a comment, sign in
-
💡 JavaScript Practice — Counting Vowels A small problem, but a good test of logic: 👉 Count the number of vowels in a string Here’s my solution: const str = "javascript"; const vowels = "aeiouAEIOU"; let count = 0; for (let letter of str) { for (let vowel of vowels) { if (letter === vowel) count++; } } console.log(count); 🧠 What this taught me: • How nested loops actually work in real scenarios • Breaking a problem into smaller steps • Writing simple, readable logic ⚡ Next step: I’ll try optimizing this (maybe using includes() or a better approach) If you have a cleaner or more efficient solution, I’d love to see it. #JavaScript #ProblemSolving #WebDevelopment #LearningInPublic
To view or add a comment, sign in
-
Started organizing my frontend learning exercises on GitHub while practicing HTML, CSS, and JavaScript. Instead of keeping everything locally, I thought it might be useful to keep the exercises structured in a repository. If anyone else is learning frontend fundamentals and wants small practice exercises, feel free to use it as well. Repository: https://lnkd.in/gQ_DzSgk Will keep adding more exercises as I progress. #HTML #CSS #JavaScript #FrontendLearning
To view or add a comment, sign in
-
-
🚀 Day 6 of #100DaysOfCode Built a Pomodoro Timer using JavaScript to improve focus and productivity. Features: ⏱️ 25-minute focus timer ▶️ Start / Stop / Reset functionality Learning more about JavaScript timers and DOM manipulation. Repo:-https://lnkd.in/geZqCnQ9 #JavaScript #WebDevelopment #Frontend
To view or add a comment, sign in
-
-
Today’s Learning: JavaScript Events I spent time understanding how events work in JavaScript. An event is basically something that happens in the browser — like clicking a button, pressing a key, or moving the mouse — and we can make our code respond to it. Key points I learned: Event triggers → Something happens (click, keypress, hover…) Event object → Provides details about the event (type, target, key…) Event listener → Function that runs when the event occurs Recommended way: addEventListener (keeps HTML clean and flexible) Example: document.getElementById("btn").addEventListener("click", function(event) { console.log("Event type:", event.type); console.log("Clicked element:", event.target); }); Understanding events is essential for interactive web pages, and I’m excited to practice more with different event types like mouseover, keydown, and submit. #JavaScript #WebDevelopment #LearningJourney #Frontend
To view or add a comment, sign in
-
🚀 Built a small JavaScript project: Guess The Number Game Features: • Random number generation using JavaScript • User input validation • Dynamic feedback (Too high / Too low) • Attempt tracking Tech Stack: HTML • CSS • JavaScript This project helped me practice DOM manipulation and basic game logic. Try it here: https://lnkd.in/gMDTeM8N #webdevelopment #javascript #frontend #learning
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