Built a Currency Converter 💱 using HTML, CSS, and JavaScript — powered by a real-time API. Live Demo : https://lnkd.in/gHXxF-CE 🔹 Fetches live exchange rates using API 🔹 Instant and accurate conversions 🔹 Clean and responsive UI This project helped me understand how APIs work in real-world applications. 🚀 #WebDevelopment #JavaScript #API #Frontend #Projects
Marshia Mehnaz’s Post
More Relevant Posts
-
🚀 Day 2 – JSX & Components in React JSX (JavaScript XML) allows us to write HTML-like syntax inside JavaScript, making UI code more readable and structured. 🔹 JSX is not HTML, but it looks similar 🔹 It gets converted into JavaScript using Babel 🔹 We can use expressions inside {} Components are the core building blocks of React applications. 🔹 Functional components are simple JavaScript functions 🔹 They return JSX 🔹 Help in creating reusable and modular UI JSX and Components together make React efficient for building scalable applications. #ReactJS #JSX #Components #Frontend #WebDevelopment
To view or add a comment, sign in
-
-
🎙️ JavaScript Web APIs are more powerful than most people realize Ever played with the Speech Recognition Web API in the browser? With just a few lines of JavaScript, your browser can: • Listen to your voice • Convert speech into text • Stream results in real time I attached a minimal example: What’s happening in this example (in simple terms): 🔹 SpeechRecognition This is a browser-provided object (not JavaScript itself). The browser talks to the OS and speech engine for us. 🔹 continuous = true The mic stays open. You don’t have to restart recognition after every sentence. 🔹 interimResults = true You get live partial results while the user is still speaking (great for real-time UIs). 🔹 onresult event The browser pushes recognized speech back to JavaScript as structured data. Each result improves as speech continues. Why this API is interesting: • Real-time voice search • Accessibility improvements • Voice-driven forms • Hands-free interfaces • Voice-assisted UIs using built-in browser capabilities #JavaScript #WebAPIs #Frontend #React #WebDevelopment
To view or add a comment, sign in
-
-
Untangling simple things we use as developers that sound fancy in theory: the JavaScript Event Loop. JavaScript is single-threaded. One main thread, one call stack, one thing at a time. The event loop is the cycle that coordinates the call stack, queues, and repaints. 🔵 The call stack JavaScript's list of what it's currently doing. Functions get added when called, removed when they return. When the stack is empty, JavaScript checks the queues. 🟣 The two queues Regular queue holds the tasks: setTimeout, setInterval, click events, fetch responses. ”VIP” queue holding the microtasks: Promise callbacks, async/await continuations. The VIP queue is always fully drained before JavaScript picks up anything from the regular queue. This is why a resolved Promise always runs before a setTimeout(fn, 0) even if both are ready at the same time. 🟢 The order Run current task → drain entire VIP queue → browser repaints if needed → pick one item from regular queue → repeat. Knowing how the event loop works helps you understand why Promises behave the way they do, why the UI sometimes freezes, and why async code doesn't always run in the order you expect. #frontend #reactdeveloper #frontendarhitecture #react #recrutiers
To view or add a comment, sign in
-
Can you cancel a Promise in JavaScript? Short answer: No — but you can cancel the work behind it. A Promise is just a result container, not the async operation itself. Once created, it will resolve or reject — you can’t “stop” it directly. What you can do instead: • Use AbortController → cancels APIs like fetch • Use cancellation flags/tokens → for custom async logic • Clear timers → if work is scheduled (setTimeout) • Ignore results → soft cancel pattern Real-world takeaway: Design your async code to be cancel-aware, not Promise-dependent. This is exactly how modern tools like React Query handle requests under the hood. #JavaScript #Frontend #AsyncProgramming #WebDevelopment #ReactJS #CleanCode
To view or add a comment, sign in
-
⚛️ React vs Vanilla JavaScriptVanilla JavaScript 🧩→ Direct DOM manipulation→ Code becomes harder to manage as apps grow→ State handling can get messyReact ⚛️→ Component-based architecture→ Reusable and cleaner code→ Efficient state managementWhen building small projects, Vanilla JS works fine.But for scalable applications, React makes development faster, cleaner, and maintainable.👉 It’s not about replacing JavaScript — it’s about using it smarter.#ReactJS #JavaScript #FrontendDevelopment #WebDev #Coding
To view or add a comment, sign in
-
-
JavaScript is single-threaded… yet handles async like a pro. 🤯 If you’ve ever been confused about how setTimeout, Promises, and callbacks actually execute then the answer is the Event Loop. Here’s a crisp breakdown in 10 points 👇 1. The event loop is the mechanism that manages execution of code, handling async operations in JavaScript. 2. JavaScript runs on a single-threaded call stack (one task at a time). 3. Synchronous code is executed first, line by line, on the call stack. 4. Async tasks (e.g., setTimeout, promises, I/O) are handled by Web APIs / Node APIs. 5. Once completed, callbacks move to queues (macro-task queue or micro-task queue). 6. Micro-task queue (e.g., promises) has higher priority than macro-task queue. 7. The event loop constantly checks: Is the call stack empty? 8. If empty, it pushes tasks from the micro-task queue first, then macro-task queue. 9. This cycle repeats continuously, enabling non-blocking behavior. 10. Result: JavaScript achieves asynchronous execution despite being single-threaded. 💡 Master this, and debugging async JS becomes 10x easier. #JavaScript #WebDevelopment #Frontend #NodeJS #EventLoop #AsyncProgramming #CodingInterview
To view or add a comment, sign in
-
Most developers don’t misunderstand JavaScript. They misunderstand time. . Take setTimeout vs setImmediate. On the surface, they look interchangeable. “Just run this later,” right? That’s the lie. Here’s the reality: setTimeout(fn, 0) → runs after the current call stack + timers phase setImmediate(fn) → runs in the check phase, right after I/O So under load or inside I/O cycles… they don’t behave the same at all. Example: You’re handling a heavy I/O operation (like reading a file or API response). setTimeout → might delay execution unpredictably setImmediate → executes right after the I/O completes One is scheduled. The other is strategically placed in the event loop. That difference? It’s the kind that causes race conditions no one can reproduce. Most people write async code. Very few understand when it actually runs. And that’s where bugs live. #JavaScript #NodeJS #Async #SoftwareEngineering #Backend
To view or add a comment, sign in
-
-
What is the Event Loop in JavaScript? JavaScript is single-threaded, but it can handle asynchronous operations efficiently using the Event Loop. The Event Loop is a mechanism that allows JavaScript to perform non-blocking operations like API calls, timers, and file reading while still running on a single thread. Here’s how it works: 1. Call Stack – Executes synchronous JavaScript code. 2. Web APIs – Handles async operations like "setTimeout", "fetch", and DOM events. 3. Callback Queue / Microtask Queue – Stores callbacks waiting to be executed. 4. Event Loop – Continuously checks if the call stack is empty and pushes queued callbacks to the stack for execution. This architecture allows JavaScript to manage asynchronous tasks without blocking the main thread, making it ideal for building fast and scalable web applications. Understanding the Event Loop is essential for mastering Promises, async/await, callbacks, and performance optimization in JavaScript. #JavaScript #EventLoop #WebDevelopment #FrontendDevelopment #NodeJS #AsyncJavaScript #CodingInterview #SoftwareEngineering #FullStackDeveloper #LearnToCode
To view or add a comment, sign in
-
Recently revisiting core JavaScript concepts, and the Event Loop stands out as one of the most important ones. Even though JavaScript is single-threaded, it handles async operations so efficiently — and the Event Loop is the reason why. Understanding this helped me: ✔ Write better async code ✔ Avoid common bugs ✔ Improve app performance Still learning, but concepts like this make a big difference in real-world projects. #LearningInPublic #JavaScript #MERNStack #FrontendDevelopment
Software Engineer | Crafting Fast & Interactive Web Experiences | JavaScript • Tailwind • Git | React ⚛️
What is the Event Loop in JavaScript? JavaScript is single-threaded, but it can handle asynchronous operations efficiently using the Event Loop. The Event Loop is a mechanism that allows JavaScript to perform non-blocking operations like API calls, timers, and file reading while still running on a single thread. Here’s how it works: 1. Call Stack – Executes synchronous JavaScript code. 2. Web APIs – Handles async operations like "setTimeout", "fetch", and DOM events. 3. Callback Queue / Microtask Queue – Stores callbacks waiting to be executed. 4. Event Loop – Continuously checks if the call stack is empty and pushes queued callbacks to the stack for execution. This architecture allows JavaScript to manage asynchronous tasks without blocking the main thread, making it ideal for building fast and scalable web applications. Understanding the Event Loop is essential for mastering Promises, async/await, callbacks, and performance optimization in JavaScript. #JavaScript #EventLoop #WebDevelopment #FrontendDevelopment #NodeJS #AsyncJavaScript #CodingInterview #SoftwareEngineering #FullStackDeveloper #LearnToCode
To view or add a comment, sign in
-
Most people don’t understand the JavaScript Event Loop. So let me explain it in the simplest way possible: JavaScript is single-threaded. It can only do ONE thing at a time. It uses something called a call stack → basically a queue of things to execute. Now here’s where it gets interesting: When async code appears (like promises or setTimeout), JavaScript does NOT execute it right away. It sends it away to the Event Loop and then keeps running what’s in the call stack. Only when the call stack is EMPTY… the Event Loop starts pushing async tasks back to be executed. Now look at the code in the image. What do you think runs first? Actual output: A D C B Why? Because not all async is equal: Promises (microtasks) → HIGH priority setTimeout (macrotasks) → LOW priority So the Event Loop basically says: “Call stack is empty? cool… let me run all promises first… then I handle setTimeout” If you get this, async JavaScript stops feeling random. #javascript #webdevelopment #frontend #reactjs #softwareengineering
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
Sería bueno que revise las cadenas de carácteres, están muy largas en las listas