Day 40/100 – JavaScript Learning 🚀 Today I learned about an important JavaScript concept that explains how code is executed behind the scenes: 👉 The Call Stack The call stack is a mechanism JavaScript uses to keep track of function execution. Every time a function is called, it is added to the stack. When the function finishes, it is removed from the stack. Example: function first() { second(); } function second() { console.log("Hello"); } first(); Execution order: first() is added to the stack second() is added on top of it console.log() runs second() is removed first() is removed 💡 Key points I learned: JavaScript uses a single call stack Functions run one at a time A blocked stack can freeze the application Stack overflow happens when too many calls are made Understanding the call stack makes it easier to: Debug errors Understand recursion Learn asynchronous JavaScript Read error stack traces This topic made JavaScript feel less mysterious and more logical. Strong fundamentals build strong developers. 💪 #JavaScript #WebDevelopment #100DaysOfCode #LearningInPublic #CallStack #Day40
Understanding JavaScript Call Stack Basics
More Relevant Posts
-
🚀 JavaScript Learning – Functions & Arrow Functions Today I spent time practicing functions in JavaScript and then rewrote the same logic using arrow functions to really see the difference. Functions help avoid repeating code and keep logic organized. Once you get comfortable with them, writing JS feels much cleaner. Norma function example: function calculateSum(a, b) { return a + b; } let result1 = calculateSum(5, 3); console.log(result1); Then I converted the same logic into an arrow function: const calculateSum = (a, b) => a + b; let result2 = calculateSum(10, 7); console.log(result2); Same output, less code. Arrow functions feel simpler for small tasks, while normal functions are still useful in many cases. Practicing by rewriting code is helping things click much faster 💻🔥 #JavaScript #FrontendDevelopment #WebDevelopment #CodingJourney #LearningInPublic #DeveloperLife
To view or add a comment, sign in
-
-
📌 JavaScript Learning Resource – Cheat Sheet While revising JavaScript, I found a helpful cheat sheet that summarizes core concepts like variables, operators, control flow, functions, arrays, DOM basics, and async ideas. Sharing it here for anyone who is refreshing JS fundamentals like me. Found this while learning and thought it might help others, too. Follow Nikhil Tiwari for more useful content w3schools.com JavaScript Mastery #JavaScript #LearningJourney #WebDevelopment #StudentsInTech
To view or add a comment, sign in
-
#interviewPreparation 💡 Angular learning | JavaScript fundamentals Object.freeze(), Object.seal(), and Object.preventExtensions() are used to control how JavaScript objects can be changed. Choosing the right one helps avoid unexpected bugs and makes code more predictable. 1️⃣ Object.freeze() What it does: Prevents adding, deleting, and modifying properties (top-level only). Key points: - Object becomes read-only - Nested objects are still mutable - Operation is shallow When to use: Use when you need full immutability, like constants or configuration objects. 2️⃣ Object.seal() What it does: Prevents adding and deleting properties but allows modifying existing ones. Key points: - Object structure is locked - Existing values can change - Nested objects are still mutable When to use: Use when object shape must stay the same but values need to update. 3️⃣ Object.preventExtensions() What it does: Prevents adding new properties. Key points: - Existing properties can be modified - Existing properties can be deleted - Least restrictive option When to use: Use when you only want to stop new keys from being added. Key takeaway: All three methods are shallow. Nested objects are NOT protected unless handled separately. 💡 Right choice = cleaner code + fewer bugs #JavaScript #Angular #FrontendDevelopment #WebDevelopment #Coding #Programming #DeveloperLife #LearnJavaScript #AngularTips
To view or add a comment, sign in
-
📚 Back to the Core: Strengthening My JavaScript Foundations Lately, I’ve been dedicating focused time to revisiting the core concepts of JavaScript — not just skimming through tutorials, but truly understanding how things work under the hood. Instead of rushing toward frameworks, I decided to slow down and strengthen my fundamentals: ✅ Scope & Closures ✅ Hoisting ✅ Execution Context & Call Stack ✅ Prototypes & Inheritance ✅ Asynchronous JavaScript (Promises, Async/Await, Event Loop) ✅ “this” keyword behavior One thing that has made a huge difference? ✍️ Taking structured notes while studying 💻 Practicing side by side as I learn Writing notes forces clarity. Practicing immediately reinforces understanding. When theory meets implementation, concepts stick. I’ve realized that strong fundamentals make everything else easier — debugging, reading code, learning frameworks, and even system design. It’s tempting to jump straight into tools and libraries, but mastering the basics builds long-term confidence. If you're learning JavaScript (or any skill), my advice: 👉 Don’t skip the core concepts. 👉 Take notes like you’ll teach someone else. 👉 Practice while you study. Growth happens when learning is intentional. #JavaScript #WebDevelopment #LearningJourney #100DaysOfCode #FrontendDevelopment #SoftwareDevelopment #ContinuousLearning
To view or add a comment, sign in
-
-
📌 JavaScript Learning Resource – Cheat Sheet While revising JavaScript, I found a helpful cheat sheet that summarizes core concepts like variables, operators, control flow, functions, arrays, DOM basics, and async ideas. Sharing it here for anyone who is refreshing JS fundamentals like me. Found this while learning and thought it might help others, too. Follow Rahul Choudhary for more useful content w3schools.com JavaScript Mastery #JavaScript #LearningJourney #WebDevelopment #StudentsInTech
To view or add a comment, sign in
-
📌 JavaScript Learning Resource – Cheat Sheet While revising JavaScript, I found a helpful cheat sheet that summarizes core concepts like variables, operators, control flow, functions, arrays, DOM basics, and async ideas. Sharing it here for anyone who is refreshing JS fundamentals like me. Found this while learning and thought it might help others, too. Follow Muhammad Nouman for more useful content #JavaScript #LearningJourney #WebDevelopment #StudentsInTech
To view or add a comment, sign in
-
Today’s Learning: call(), apply(), bind() & the Power of this in JavaScript Today I studied one of the most important (and often confusing) topics in JavaScript — call(), apply(), bind(), and how the this keyword actually works. Here’s what I understood 👇 🔹 What is this in JavaScript? The value of this depends on how a function is called, not where it is written. In JavaScript: In the global scope → this refers to the global object. Inside a regular function → this depends on the calling context. Inside an object method → this refers to the object. In arrow functions → this is lexically inherited from the surrounding scope. This dynamic nature of this is what makes JavaScript powerful — but also tricky. 🔹 Why Do We Need call(), apply(), and bind()? Sometimes we want to manually control what this refers to inside a function. That’s where these three methods come in. They allow us to: Borrow functions from other objects Explicitly set the value of this Reuse logic across multiple objects Control execution context 🔹 call() Immediately invokes a function. Allows us to pass arguments individually. Explicitly sets the value of this. It is useful when we want to execute a function instantly while controlling its context. 🔹 apply() Similar to call(). Immediately invokes the function. The difference is that arguments are passed as an array. It is especially useful when working with dynamic argument lists. 🔹 bind() Does NOT execute the function immediately. Returns a new function with this permanently bound. Allows delayed execution while preserving context. This is extremely useful in: Event handlers Callbacks React components Asynchronous functions 🔹 How this Scope Actually Works Internally When a function is invoked, JavaScript creates a new execution context. During this phase: The value of this is determined. Memory is allocated. Scope chain is created. The important part: this is determined at call-time, not at definition-time (except in arrow functions). Understanding this completely changes how you debug issues related to: Lost context Undefined values Incorrect object references Event handler bugs Grateful again to Sheryians Coding School, Anshu Pandey for emphasizing deep JavaScript fundamentals. Building strong foundations before moving forward. #JavaScript #CallApplyBind #ThisKeyword #ExecutionContext #FrontendDevelopment #LearningInPublic #SheryiansCodingSchool #AnshuBhaiya #AnshuPandey #WebDevelopment
To view or add a comment, sign in
-
-
🚀 Day 1/30: JavaScript Challenge – Create Your First “Hello World” Function! 💻 Kickstarting my 30-Day JavaScript Challenge! 🎯 Today’s task: Create a “Hello World” Function. JavaScript is all about building logic step by step, and every journey begins with the basics. By completing this challenge daily, I’m leveling up my JS skills and sharing the code for real-time practice. 💡 Tip for beginners: Functions are the building blocks of JavaScript. Mastering them will make your coding journey smoother. ✅ Follow along as I share Day 1 to Day 30 solutions and insights. Let’s learn and grow together! JavaScript tutorial Beginner JavaScript Coding challenge Daily JavaScript practice Learn coding online Web developer tips Function in JavaScript Hello World function JS for beginners Practical coding #JavaScript #30DaysOfCode #CodingChallenge #WebDevelopment #LearnToCode #Programming #JSForBeginners #HelloWorld #CodeEveryday #DevCommunity #LinkedInLearning #TechLearning #100DaysOfCode
To view or add a comment, sign in
-
-
📌 JavaScript Learning Resource – Cheat Sheet While revising JavaScript, I found a helpful cheat sheet that summarizes core concepts like variables, operators, control flow, functions, arrays, DOM basics, and async ideas. Sharing it here for anyone who is refreshing JS fundamentals like me. Found this while learning and thought it might help others too. #JavaScript #LearningJourney #WebDevelopment #StudentsInTech
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