🚀 Day 11 of My JavaScript Learning Journey Today I learned about JavaScript Scopes and Function Execution Context (FEC) — a core concept to understand how JavaScript manages variables and executes code. 📌 Key concepts I explored: 🔹 Scopes in JavaScript • Global Scope – Variables accessible throughout the program • Local Scope – Variables accessible within a function • Block Scope – Variables declared with let and const inside {} 🔹 Key Difference • var → Function scoped • let & const → Block scoped 🔹 Function Execution Context (FEC) Every time a function is called, JavaScript creates a new execution context. ⚙️ FEC Lifecycle: 1️⃣ Memory Creation Phase • Variables are hoisted and initialized • Functions are stored in memory 2️⃣ Execution Phase • Code runs line by line • Variables get their actual values 🔹 FEC Components • Variable Environment • Scope Chain (access to outer scope) • this keyword 💡 Understanding scopes and execution context helps in writing efficient, bug-free, and optimized JavaScript code. Step by step, I’m strengthening my JavaScript fundamentals and internal working knowledge. 💻✨ #JavaScript #WebDevelopment #FrontendDevelopment #CodingJourney #LearningInPublic #DeveloperJourney #ProgrammingBasics
JavaScript Scopes and Function Execution Context Explained
More Relevant Posts
-
🚀 Learning Update | JavaScript Internals & Async Mastery Here’s what I worked on recently: 🔹 Core Concepts (MDN Deep Dive) Studied the JavaScript Event Loop and Promises to build a strong conceptual foundation. 🔹 Custom Promise Implementation Implemented a Promise from scratch, including: • Constructor & executor • resolve/reject handling • Promise chaining 🔹 Utility Methods Built custom implementations of: • Promise.all() • Promise.race() • Promise.allSettled() 🔹 Testing & Edge Cases Wrote comprehensive test cases covering: • Promise chaining • Error handling • Race conditions 🔹 Learning by Teaching 🎥 Recorded a video explaining Promises & Event Loop with practical code examples. 🔹 Code Sharing Pushed the complete implementation to GitHub with detailed comments for better readability and understanding. 🔹 Communication Improvement Continued reading The Power of Subconscious Mind to enhance clarity and communication 🧠 Diving deeper into fundamentals to build stronger systems thinking. #JavaScript #AsyncProgramming #NodeJS #WebDevelopment #LearningInPublic #GrowthMindset
To view or add a comment, sign in
-
🚀 Day 15 of My JavaScript Learning Journey Today I explored one of the most important concepts in JavaScript — how it actually works behind the scenes! 🤯 Here’s what I learned 👇 🧠 JavaScript Engine & Single Thread Concept JavaScript runs on a single thread — meaning it executes one task at a time. But still, it feels fast… how? 👀 ⚙️ What Makes JS Synchronous By default, JavaScript executes code line by line (synchronously). But real-world apps need more power! 🌐 Understanding Web APIs Browsers provide Web APIs (like setTimeout, DOM events) that handle async tasks outside JS engine 💡 📥 Callback Queue & Task Queue Async tasks go into queues and wait for their turn to be executed. 🔁 Event Loop Explained The Event Loop checks if the call stack is empty and then pushes tasks from the queue — this is how async magic happens! ✨ 📌 Summary & Key Takeaways: ✔ JS is single-threaded but handles async operations smartly ✔ Event Loop is the heart of async behavior ✔ Web APIs make non-blocking execution possible 📚 Prerequisites I Used: • Basic HTML & CSS • VS Code • Browser 🎯 Skills I'm Building: 💻 Interactive web apps 🧩 Strong JavaScript fundamentals 🎨 Clean & maintainable code #Day15 #JavaScript #LearnJavaScript #WebDevelopment #CodingJourney #FrontendDevelopment #Programming #Beginners #JavaScriptBasics #EventLoop #AsyncJavaScript
To view or add a comment, sign in
-
-
Day 4 of my JavaScript learning journey 🚀 Yesterday was all about building a strong foundation by understanding some core JavaScript concepts: 🔹 Introduction to JavaScript Got a clearer picture of how JavaScript powers interactivity on web pages and why it's such an essential language for developers. 🔹 Variables in JavaScript Learned how to store and manage data using: - var – function-scoped and the old way of declaring variables - let – block-scoped and more flexible - const – block-scoped and used for values that shouldn’t change 🔹 JavaScript Output Methods Explored different ways to display data: - "console.log()" – for debugging in the console - "document.write()" – directly writing to the webpage - "alert()" – showing pop-up messages - "prompt()" – taking user input 🔹 JavaScript Data Types Understood how data is categorized: - Primitive Types – string, number, boolean, null, undefined, symbol, bigint - Non-Primitive Types (Important) – objects, arrays, and functions It’s amazing to see how these basic concepts connect and form the backbone of everything we build in JavaScript. Looking forward to diving deeper and building more 🚀 #JavaScript #WebDevelopment #LearningJourney #Day4 #Coding
To view or add a comment, sign in
-
-
🚀 Day 16 of My JavaScript Journey Today was a powerful learning day 💻🔥 I explored some core JavaScript concepts that are extremely important for real-world applications. ✨ Topics I Covered: 🔹 Synchronous vs Asynchronous code 🔹 How the JavaScript Event Loop works 🔁 🔹 Why Callback Hell is a problem 😵 🔹 Creating Promises using "resolve" and "reject" 🤝 🔹 ".then()", ".catch()", ".finally()" methods 🔹 Sequential vs Parallel Promise execution ⚡ 🔹 Comparison of Promise utility methods 🔹 Real-world example: Food Delivery App (Zomato Clone 🍔) 🔹 API fetching using Promises 🌐 🔹 Error handling patterns 🚨 💡 Key Learning: Understanding asynchronous JavaScript is a game-changer 💯 Concepts like the Event Loop and Promises help write cleaner, more efficient, and scalable code. 🍽️ The food delivery app example helped me understand how multiple tasks like ordering, payment, and delivery can run efficiently using async concepts. 🔥 Growing step by step every day! Consistency is the key 🔑 #JavaScript #WebDevelopment #CodingJourney #DaysOfCode #AsyncJS #Promises #Learning #DeveloperLife
To view or add a comment, sign in
-
-
Day 8 of My JavaScript Journey 🚀 Today, I started learning about functions in JavaScript. Functions are used to group and reuse code, making programs more organized and efficient. There are three types of functions: • Function declaration • Function expression • Arrow function Today, I focused on function declaration. Example: function greet(name) { return "Hello " + name; } One thing I noticed: Functions can feel a bit difficult at first, but they are a core part of JavaScript. So instead of rushing, I’m taking my time to truly understand how they work. Key takeaway: Mastering functions is essential because they are used everywhere in JavaScript. #JavaScript #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
🚀 Day 70 | JavaScript Functions Deep Dive As part of my journey, today I focused on understanding different types of functions in JavaScript 💻 🔹 What I Worked On: • Function Declaration → basic function usage • Function Expression → assigning function to variable • Functions with & without parameters • Functions with return & without return • Object methods using this keyword • Anonymous functions • Higher-order functions (function inside function) • Callback functions • Recursive functions • IIFE (Immediately Invoked Function Expression) • Arrow functions 💡 Key Learning: • Functions are the core building blocks of JavaScript • Different types of functions are used based on the situation • Callbacks and higher-order functions are very important in real-world applications • Arrow functions provide shorter and cleaner syntax 🔥 Takeaway: 👉 Mastering functions is key to writing efficient and scalable JavaScript code Consistency is making concepts stronger day by day 🚀 #Day70 #JavaScript #Functions #WebDevelopment #ProblemSolving #CodingJourney #10000Coders #FrontendDeveloper #ValiBashaSir
To view or add a comment, sign in
-
🚀 Day 10 of My JavaScript Learning Journey Today I explored JavaScript Functions — the core building blocks of any application. 📌 Key concepts I learned: 🔹 Types of Functions • Named Functions – Functions with a defined name • Anonymous Functions – Functions without a name, often used for one-time use • Arrow Functions (=>) – Modern and concise syntax 🔹 Function Expressions • Functions can be assigned to variables and treated like data 🔹 Advanced Concepts • First-Class Functions – Functions can be passed as arguments and returned from other functions • Higher-Order Functions – Functions that work with other functions • IIFE (Immediately Invoked Function Expression) – Executes immediately after definition 🔹 Scope & Closures • Nested Functions create scope within scope • Important for managing variables and data access 🔹 Generators • Functions that allow pausable execution using yield ⚙️ Understanding functions is crucial because they help write modular, reusable, and efficient code. Step by step, I’m building strong JavaScript fundamentals and problem-solving skills. 💻✨ #JavaScript #WebDevelopment #FrontendDevelopment #CodingJourney #LearningInPublic #DeveloperJourney #ProgrammingBasics
To view or add a comment, sign in
-
-
🚨 JavaScript finally started making sense after this… For a long time, I was just using functions in JS. But recently, I learned about: 👉 Scope 👉 Closures 👉 Higher Order Functions (HOF) And things clicked differently. 💡 Here’s what changed my understanding: ✅ Scope It’s not just about variables — it’s about where your code can access data ✅ Closures -> This blew my mind 🤯 A function doesn’t just execute… It remembers the environment where it was created. 👉 Even after the outer function is gone. ✅ Higher Order Functions Functions in JavaScript are not just “callable” They are: ✔ Passed as arguments ✔ Returned from other functions ✔ Stored like values 💡 The biggest shift for me: 👉 “Functions are not just actions, they are values with memory. They are first-class citizens in JavaScript” If you’re learning JavaScript: Don’t rush. These concepts feel hard at first… but once they click, everything changes. Course Instructor: Rohit Negi | Youtube Channel: CoderArmy. #JavaScript #WebDevelopment #Closures #fullstackdevelopment #LearnInPublic #coding
To view or add a comment, sign in
-
Day 9 of My JavaScript Journey 🚀 Today, I continued learning about functions in JavaScript. I explored: • Function expressions: This is a function stored inside a variable • Arrow functions: This is a shorter and cleaner way to write functions, especially for simple one-line operations Example: const add = (a, b) => a + b; One important concept I understood: All functions, no matter how they are written, follow the same process: Receive input (parameters), Transform the data, and Return an output This made things much clearer for me. Key takeaway: Different function styles exist, but they all serve the same purpose making code reusable and organized. #JavaScript #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
🚀 Day 37 of My Full Stack Development Journey Today I explored some advanced JavaScript concepts that are widely used in real-world development ⚡ Here’s what I learned today: 🔹 Function Expressions – Storing functions in variables 🔹 Higher Order Functions – Functions returning other functions 🔹 Methods – Functions inside objects 🔹 'this' keyword – Understanding context in JavaScript 🔹 try & catch – Handling errors gracefully 🔹 Arrow Functions – Cleaner and modern syntax 🔹 Implicit Return – Writing concise arrow functions 🔹 Solved practice questions and 5 assignment questions 💻 These concepts helped me understand how JavaScript becomes more powerful and flexible in real applications. Step by step, leveling up my coding skills 🚀 #FullStackJourney #WebDevelopment #JavaScript #LearningInPublic #100DaysOfCode #CodingJourney
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