Day 10/100 of my #100DaysOfCode journey. Today I started learning one of the most important concepts in modern JavaScript — Promises. Key concepts I explored: • synchronous vs asynchronous code • how Promises work (pending → fulfilled → rejected) • handling async operations using .then() and .catch() To practice, I created a small example that simulates an API call using a Promise and setTimeout. One interesting realization: Automation frameworks interact with browsers and APIs constantly — both of which are asynchronous operations. Understanding Promises is essential before moving to async/await, which is heavily used in tools like Playwright. Next → rewriting these examples using async/await. #100DaysOfCode #SoftwareTesting #JavaScript #QAAutomation #LearningInPublic
Learning Promises in JavaScript for #100DaysOfCode
More Relevant Posts
-
🚀 Understanding Async JavaScript: async/await vs .then() Today I practiced handling asynchronous operations in JavaScript using both Promises and async/await 🔥 📌 What I explored: 💡 Key Insight:While .then() works perfectly, async/await makes asynchronous code look synchronous — improving readability and maintainability. 🧠 Example takeaway: Both approaches are powerful — choosing the right one depends on the use case! 🌐 API used: JSONPlaceholder for dummy data testing 📈 Small steps every day towards mastering JavaScript! #JavaScript #AsyncAwait #WebDevelopment #FrontendDeveloper #CodingJourney #LearnInPublic #100DaysOfCode
To view or add a comment, sign in
-
-
Consistency is starting to compound, and Day 59 is proof of that 💻✨ Today’s focus was solving the “string ends with?” problem in JavaScript. It looked simple at first, but it really helped reinforce how built-in methods like endsWith() work under the hood. Also explored an alternative approach using slice()—a great reminder that there’s always more than one way to solve a problem. The biggest learning? Writing clean, readable solutions is just as important as getting the correct output. 🧠 One step closer to mastering problem-solving and strengthening core JavaScript fundamentals 🚀 #100DaysOfCode #JavaScript #CodingJourney #ProblemSolving #WebDevelopment #LearnToCode #Consistency #TechGrowth
To view or add a comment, sign in
-
-
Day 11/100 of my #100DaysOfCode journey. Today I learned one of the most important JavaScript concepts for automation engineers — async/await. What I explored today: • how async functions work • using await to pause execution until a Promise resolves • handling errors with try...catch • running multiple async tasks with Promise.all() To practice, I rewrote yesterday’s Promise examples using async/await, and the code immediately became much easier to read. One thing that stood out today: Async/await makes asynchronous code feel almost like synchronous code — which makes debugging and maintaining automation scripts much easier. This concept is heavily used in modern automation frameworks like Playwright. Next → deeper JavaScript concepts and OOP. #100DaysOfCode #SoftwareTesting #QAAutomation #JavaScript #LearningInPublic
To view or add a comment, sign in
-
-
𝐃𝐚𝐲 𝟔/𝟑𝟎 🚀 𝐓𝐨𝐝𝐚𝐲 𝐈 𝐥𝐞𝐚𝐫𝐧𝐞𝐝: Generating random values and working with strings in JavaScript 𝐁𝐮𝐢𝐥𝐭: A password generator that creates random passwords using letters, numbers, and symbols 𝐊𝐞𝐲 𝐭𝐚𝐤𝐞𝐚𝐰𝐚𝐲: Used loops and random indexing to build a dynamic string generator #30DaysChallenge #WebDev #LearningInPublic
To view or add a comment, sign in
-
𝐃𝐚𝐲 𝟔/𝟑𝟎 🚀 𝐓𝐨𝐝𝐚𝐲 𝐈 𝐥𝐞𝐚𝐫𝐧𝐞𝐝: Generating random values and working with strings in JavaScript 𝐁𝐮𝐢𝐥𝐭: A password generator that creates random passwords using letters, numbers, and symbols 𝐊𝐞𝐲 𝐭𝐚𝐤𝐞𝐚𝐰𝐚𝐲: Used loops and random indexing to build a dynamic string generator #30DaysChallenge #WebDev #LearningInPublic
To view or add a comment, sign in
-
🚀 Day 9/100 — #100DaysOfCode Diving deeper into JavaScript and understanding how it really works behind the scenes 💻 Today was all about moving from basics to advanced concepts that power real-world applications. 📚 What I learned: 🧠 Core Concepts • Scope — understanding where variables are accessible • Execution Context — how JavaScript runs code step-by-step • Closures — functions remembering their outer scope ⚡ Advanced Concepts • this keyword — context of execution • Object-Oriented JavaScript — structuring code using objects 🔄 Asynchronous JavaScript • Callbacks — handling async tasks • Promises — better async handling • Async/Await — clean and readable async code 🌐 API Handling • Fetch API — getting data from servers • HTTP Basics — request & response understanding 💡 Key Insight: JavaScript is not just a language — it’s an ecosystem for building dynamic, real-world applications. 🔥 Day 9 complete. Learning how real apps communicate and function. #JavaScript #AsyncJS #WebDevelopment #100DaysOfCode #CodingJourney #BuildInPublic
To view or add a comment, sign in
-
-
Published My New Blog on Hashnode! Understanding JavaScript can feel confusing at first—especially when it comes to Synchronous vs Asynchronous behavior. So I decided to break it down in the simplest way possible. 🧠 In this blog, I explained: What synchronous code really means (step-by-step execution) What asynchronous code is (doing things without waiting) Why JavaScript needs async behavior Real-life examples like API calls & timers Problems with blocking code (why apps freeze ) Easy diagrams to visualize everything link :- [https://lnkd.in/gkdRbW56] #JavaScript #WebDevelopment #CodingForBeginners #AsyncJavaScript #LearnToCode #FrontendDevelopment
To view or add a comment, sign in
-
-
🧠 JavaScript Event Loop — Explained Simply Ever wondered how JavaScript handles async operations like setTimeout or API calls? 👉 JavaScript is single-threaded, but it manages async tasks using the Event Loop. 💡 Key Components: ✔ Call Stack → Executes functions ✔ Callback Queue → Handles setTimeout, events ✔ Microtask Queue → Promises (higher priority) 🔥 Flow: 1. Execute sync code 2. Move async tasks to queues 3. Event loop pushes tasks back to stack ⚡ Important: Promises (microtasks) always execute before setTimeout (callbacks) 💬 Did you know this before? Where have you faced issues with async code? #JavaScript #EventLoop #WebDevelopment #Frontend #Coding
To view or add a comment, sign in
-
-
🚀 Day 955 of #1000DaysOfCode ✨ How JavaScript Event Loop Works Behind the Curtains JavaScript looks simple on the surface — but under the hood, a lot is happening to make async code work smoothly. In today’s post, I’ve explained how the JavaScript Event Loop actually works behind the scenes, so you can understand how tasks are executed, queued, and prioritized. From the call stack to the callback queue and microtask queue, this concept explains why some functions run before others — even when the code looks sequential. Understanding the event loop helps you debug tricky async issues, avoid unexpected behavior, and write more predictable code. If you’re working with promises, async/await, or APIs, this is one of those concepts you must truly understand. 👇 What part of the event loop confuses you the most — call stack, microtasks, or callbacks? #Day955 #learningoftheday #1000daysofcodingchallenge #FrontendDevelopment #WebDevelopment #JavaScript #React #CodingCommunity #AsyncJavaScript
To view or add a comment, sign in
-
🚀 Day 952 of #1000DaysOfCode ✨ Understanding Arrow Functions in JavaScript Arrow functions look simple — but there’s more to them than just shorter syntax. In today’s post, I’ve explained arrow functions in a clear and practical way, including how they differ from regular functions and where they should (and shouldn’t) be used. From lexical `this` binding to cleaner function expressions, arrow functions help you write more concise and predictable code when used correctly. But they also come with limitations — especially when working with methods, constructors, or certain event handlers. Understanding these trade-offs is what helps you use them effectively in real-world applications. If you’re writing modern JavaScript, mastering arrow functions is a must-have skill. 👇 What’s one mistake you made while learning arrow functions? #Day952 #learningoftheday #1000daysofcodingchallenge #FrontendDevelopment #WebDevelopment #JavaScript #React #CodingCommunity #JSBasics
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
One thing that really clicked for me today: Promises make it much easier to deal with things that take time — like API calls or browser actions. Without them, the code would get messy pretty quickly and debugging would become a headache.