MONIMEGA
  • Blog
    • Politics
    • Software
    • Technology
    • Business
    • Design
    • Hardware
    • Health
    • Italy
    • Music
    • Sports
    • Strategy
    • World
  • Contatto
  • Galleria
  • Informazioni
  • Servizi
  • Walmart Black Friday deals include the AirPods Pro 2 for their lowest price yet

    November 25, 2025
    Hardware

    With the launch of the new AirPods Pro 3, Apple made the biggest update to its flagship earbuds in years. But before then, the AirPods Pro 2 were our top picks for the best wireless earbuds for Apple users. They remain a great option today (particularly thanks to software updates), but they can be a bit hard to find. This is where Walmart Black Friday deals come into play right now. Walmart has the AirPods Pro 2 for $139, which is the lowest we’ve ever seen them and more than $100 off their standard $249 price tag. During Black Friday last year, they dropped to around $155.

    At this price, the AirPods Pro 2 are a good option for anyone who wants most of the conveniences and features of the Pro 3s without spending nearly $100 more. They have excellent active noise cancellation and great sound quality, and thanks to a firmware update, they do support Apple’s new Live Translation feature. Using the buds in tandem with the Translate app on iPhones running iOS 26 or later, you can translate foreign languages in conversation in real time, hearing other languages being spoken to you in your preferred language.

    Sound quality remains great on the Pro 2 and battery life hits at around six hours of use on a single charge with ANC enabled. The wireless charging case that comes with the Pro 2 actually offers more total hours of listening time than the Pro 3 — 30 hours in total, in comparison to the Pro 3’s 24 hours. You also get most of Apple’s health tracking capabilities along with all the conveniences of the H2 chipset, which includes quick pairing and switching, plus hands-free Siri. What you won’t get here is built-in heart rate tracking and improved sound quality and ANC, all of which are stand-out features of the new Pro 3.

    In addition to the AirPods Pro 2, other AirPods are on sale for Black Friday. AirPods 4, both with and without ANC, are down to record-low or near-record low prices. Plus, the new AirPods Pro 3 are on sale for their best price since their launch in September. We’ll update this post as more Walmart Black Friday tech deals come in.

    This article originally appeared on Engadget at https://www.engadget.com/deals/walmart-black-friday-deals-include-the-airpods-pro-2-for-their-lowest-price-yet-170032969.html?src=rss


    Source: Engadget is a web magazine with obsessive daily coverage of everything new in gadgets and consumer electronics.

  • Nas and DJ Premier Announce New Album Light-Years

    Nas and DJ Premier Announce New Album Light-Years

    November 25, 2025
    Music

    Nas and DJ Premier have finally announced the title and release date for their long-teased collaborative album: Light-Years is out December 12 via Mass Appeal. See the album cover—featuring a photograph by Danny Hastings and art direction by Michael Lukowski—below.

    Nas and DJ Premier have worked together for the bulk of their careers, dating back to the Queens rapper’s iconic 1994 debut, Illmatic. The artists reunited last year for “Define My Name” and began to tease an album.

    Light-Years caps Mass Appeal’s yearlong celebration of New York hip-hop that has included new albums from Slick Rick, Raekwon, Ghostface Killah, Mobb Deep, the late Big L, and De La Soul.

    Nas shared his latest studio album, Magic 3, in September 2023. DJ Premier, this year, has released collaborations with Roc Marciano (The Coldest Profession) and Ransom (The Reinvention).

    Read about Nas’ Illmatic at No. 5 in Pitchfork’s “The 100 Best Rap Albums of All Time.”

    Nas DJ Premier LightYears

    Source: RSS: News.

  • Mapping the Brain’s Sense of What Goes On Inside the Body

    November 25, 2025
    Health

    Scientists are learning how the brain knows what’s happening throughout the body, and how that process might go awry in some psychiatric disorders.


    Source: NYT > Well.

  • How GitHub’s agentic security principles make our AI agents as secure as possible

    November 25, 2025
    Software

    We’ve been hard at work over the past few months to build the most usable and enjoyable AI agents for developers. To strike the right balance between usability and security, we’ve put together a set of guidelines to make sure that there’s always a human-in-the-loop element to everything we design.

    The more “agentic” an AI product is, the more it can actually do, enabling much richer workflows, but at the cost of a greater risk. With added functionality, there’s a greater chance and a much greater impact of the AI going off its guardrails, losing alignment, or even getting manipulated by a bad actor. Any of these could cause security incidents for our customers.

    To make these agents as secure as possible, we’ve built all of our hosted agents to maximize interpretability, minimize autonomy, and reduce anomalous behavior. Let’s dive into our threat model for our hosted agentic products, specifically Copilot coding agent. We’ll also examine how we’ve built security controls to mitigate these threats, and perhaps you’ll be able to apply these principles to your own agents.

    When developing agentic features, we are primarily concerned with three classes of risks:

    1. Data exfiltration

    When an agent has Internet access, it could leak data from the context to unintended destinations. The agent may be tricked into sending data from the current repository to an unintended website, either inadvertently or maliciously. Depending on the sensitivity of data, this could result in a severe security incident, such as if an agent leaks a write access GitHub token to a malicious endpoint.

    1. Impersonation and proper action attribution

    When an agent undertakes an action, it may not be clear what permissions it should have or under whose direction it should operate. When someone assigns the Copilot coding agent to an issue, who issued the directive—the person who filed the issue or the person who assigned it to Copilot? And if an incident does occur as a result of something an agent did, how can we ensure proper accountability and traceability for the actions taken by the agent?

    1. Prompt injection

    Agents operate on behalf of the initiating user, so it’s very important to ensure that the initiating user knows what the agent is going to do. Agents are prompted from GitHub Issues, files within a repository, and many other places, so it’s important to ensure that the initiator has a clear picture of all the information guiding it. If not, malicious users could hide directives and trick repository maintainers into running agents with bad directives.

    Rules for agentic products

    To help prevent the above risks, we have created a set of rules for all of our hosted agentic products to make them more consistent and secure for our users.

    1. Ensuring all context is visible

    Allowing invisible context can allow malicious users to hide directives that maintainers may not be able to see. For example, in the Copilot coding agent, a malicious user may create a GitHub Issue that contains invisible Unicode with prompt injection instructions. If a maintainer assigns Copilot to this issue, this could result in a security incident as the maintainer would not have been aware of these invisible directives. 

    To prevent this, we display the files from which context is generated and attempt to remove any invisible or masked information via Unicode or HTML tags before passing it to the agent. This ensures that only information that is clearly visible to maintainers is passed to the agent. 

    1. Firewalling the agent

    As mentioned previously, having unfettered access to external resources can allow the agent to exfiltrate sensitive information or be prompt-injected by the external resource and lose alignment.

    We apply a firewall to the Copilot coding agent to limit its ability to access potentially harmful external resources. This allows users to configure the agent’s network access and block any unwanted connections. To balance security and usability, we automatically allow MCP interactions to bypass the firewall..

    In our other agentic experiences like Copilot Chat, we do not automatically execute code. For example, when generating HTML, the output is initially presented as code for preview. A user must manually enable the rich previewing interface, which executes the HTML.

    1. Limiting access to sensitive information

    The easiest way to prevent an agent from exfiltrating sensitive data is… to not give access to it in the first place!

    We only give Copilot information that is absolutely necessary for it to function. This means that things like CI secrets and files outside the current repository are not automatically passed to agents. Specific sensitive content, such as the GitHub token for the Copilot coding agent, is revoked once the agent has completed its session. 

    1. Preventing irreversible state changes

    AI can and will make mistakes. To prevent these mistakes from having downstream effects that cannot be fixed, we make sure that our agents are not able to initiate any irreversible state changes without a human in the loop.

    For example, the Copilot coding agent is only able to create pull requests; it is not able to commit directly to a default branch. Pull requests created by Copilot do not run CI automatically; a human user must validate the code and manually run GitHub Actions. In our Copilot Chat feature, MCP interactions ask for approval before undertaking any tool calls.

    1. Consistently attributing actions to both initiator and agent

    Any agentic interaction initiated by a user is clearly attributed to that user, and any action taken by the agent is clearly attributed to the agent. This ensures a clear chain of responsibility for any actions.

    For example, pull requests created by the Copilot coding agent are co-committed by the user who initiated the action. Pull requests are generated using the Copilot identity to make it clear that they were AI-generated.

    1. Only gathering context from authorized users

    We ensure that agents gather context only from authorized users. This means that agents must always operate under the permissions and context granted by the user who initiated the interaction.

    The Copilot coding agent can only be assigned to issues by users who have write access to the underlying repository. Plus, as an additional security control, especially for public repositories, it only reads issue comments from users who have write access to the underlying repository.

    Try it out now

    We built our agentic security principles to be applicable for any new AI products; they’re designed to work with everything from code generation agents to chat functionality. While these design decisions are intended to be invisible and intuitive to end users, we hope this makes our product decisions clearer so you can continue to use GitHub Copilot with confidence. For more information on these security features, check out public documentation for Copilot coding agent.

    Try out our new agentic products with GitHub Copilot >

    The post How GitHub’s agentic security principles make our AI agents as secure as possible appeared first on The GitHub Blog.


    Source: The GitHub Blog.

  • Ángela Ferrari’s Dramatic Paintings Tease Out a Passionate Play for Power

    Ángela Ferrari’s Dramatic Paintings Tease Out a Passionate Play for Power

    November 25, 2025
    Design

    Ángela Ferrari’s Dramatic Paintings Tease Out a Passionate Play for Power

    Aggression and struggles for power abound in the vivid paintings of Ángela Ferrari. The Argentinian artist is keen to explore the limits and consequences of control through scenes rife with antagonism: dogs nip at each other, horses buck and bare their teeth, and birds lie lifeless. Evoking hunting paintings and masculine displays of pride for a kill, Ferrari’s works consider the relationship between predator and prey.

    In her most recent body of work, They Shoot Horses, Don’t They?, the artist extends her proclivity for teasing out the tension between life and death. There are tiny works with looser brushstrokes that zero in on singular moments of tension, while a spate of large pieces magnify several tussles with vivid details.

    a painting by Angela Ferrari of birds, some dead and some alive with flowers
    “Aurora IX” (2024), oil on linen, 60 x 80 centimeters

    Paintings like “Aurora” stretch nearly 12 feet wide and present a diverse group of fowl with various dispositions, all against a stunning mottled sky. Some creatures appear on the verge of an inevitable battle, while others have already succumbed or go about their lives seemingly unaffected.

    Sharing a partial title with the 2024 painting “Aurora IX,” this expansive piece similarly brings together themes of decay and vitality through flowers and vibrant feathers falling to the earth after being plucked. Sensual fabrics and grand spaces complement Ferrari’s rich color palette in several works and cement her self-described “grotesque-passionate baroque” style.

    Whereas earlier paintings are set indoors, the pieces in They Shoot Horses, Don’t They? are fully in the wild. This exhibition—which shares a title with the 1969 Sydney Pollack film—brings violence and suffering front and center, a stark contrast to its presence in the background or underfoot in historical genre paintings of hunts. In doing so, Ferrari highlights a ruthless nature in which vying for domination always begets drama. Rather than dismiss such displays of hostility as inevitable, she prompts an urgent investigation into what caused such a commotion in the first place.

    They Shoot Horses, Don’t They? is on view through December 14 at Povos in Chicago. Find more of Ferrari’s work on Instagram.

    a wide landscape with a horse, birds, and dogs by Angela Ferrari
    “They shoot horses, don’t they? II” (2025), oil on linen, 450 x 155 centimeters
    a painting by Angela Ferrari of a dog with blood shooting from its mouth
    “Dog” (2025), oil on linen, 15 x 20 centimeters
    two paintings by Angela Ferrari of a horse with a mane standing nearly straight up and two barking dogs
    “Horse diptych no. 1 (1)” (2025), oil on linen, 15 x 20 centimeters
    a painting by Angela Ferrari of a dog with a bouquet of a flowers in an arched window
    “Vértigo III” (2024), oil on linen, 143 x 102 centimeters
    two paintings by Angela Ferrari of two dogs and a horse with a mane fanned out above
    “Horse diptych no. 2. (2)” (2025), oil on linen, 15 x 20 centimeters
    a painting by Angela Ferrari of a dog and rabbits with a bouquet of a flowers in an arched window
    “Vértigo” (2024), oil on linen, 140 x 120 centimeters

    Do stories and artists like this matter to you? Become a Colossal Member today and support independent arts publishing for as little as $7 per month. The article Ángela Ferrari’s Dramatic Paintings Tease Out a Passionate Play for Power appeared first on Colossal.


    Source: Colossal.

  • Flash Catanzaro, qualcuno ci ha contattato temendo che media… sponsorizzati fossero in imbarazzo nel porre quesiti su asserita incongruenza nel bando accoglienza-assistenza del Foglietti e su quello emesso (o no?) della… pubblicità (Parte 1)

    November 25, 2025
    Italy

    Teatro Politeama-Mario Foglietti

    Questa è solo la prima parte, anzi una sorta di introduzione, di un pezzo complessivo su alcune domande che riteniamo sia legittimo porre sui bandi inerenti ad alcuni servizi offerti, e attività portate avanti, dal teatro Mario Foglietti-Politeama di Catanzaro. Che, manco a dirlo, è una struttura pubblica.

    Gestita da una Fondazione omonima di cui non a caso il presidente pro tempore è sempre… d’ufficio il sindaco del capoluogo, a capo di un Cda di nomina politica. Il Teatro è dunque sovvenzionato dal Comune (e non solo) con soldi dei cittadini. Che vanno quindi impiegati al meglio.

    Attenzione, però, nel nostro approfondimento non ci sono evidenze di irregolarità. Sia chiaro! Solo che un rappresentante delle circa 7-8 agenzie per la cura di eventi, invitato al bando pubblico al pari dei colleghi per concorrere all’affidamento “mediante acquisizione di preventivi del servizio di accoglienza e assistenza al pubblico per gli spettacoli della stagione teatrale 2025/2026”, non è convinto da alcuni parametri. A suo avviso, non… conformi. E per questo ci ha girato copia della Pec, di cui abbiamo scritto un piccolissimo stralcio, ricevuta dal Politeama in qualità di uno dei soggetti privati… contattati.

    Il quale, ribadiamo, a sua volta ha contattato noi, temendo forse che altri media… sponsorizzati, a differenza di https://irriverentemente.com/ che non ha sponsor a pagamento, dalla struttura (nulla di anomalo, per carità) fossero in imbarazzo nel porre quesiti su tale asserita incongruenza.

    Anomalia che sarebbe da rinvenire “nell’offerta economica relativa a un modulo persona al costo unitario a base per affidamento di… “. Che, tradotto dal linguaggio tecnico, si riferisce all’offerta fatta dall’agenzia al Foglietti per coprire i costi (per circa 3 ore di lavoro, per lo più notturno e in giorni festivi o prefestivi) di una singola hostess o steward impiegati durante un qualsiasi spettacolo. Cifra che, va stabilito se idonea o meno, domani vi diremo qual è.

    E che, evidentemente, viene già ritenuta del tutto incongrua dall’operatore, privato, il quale per tale ragione si è rivolto a noi. Inoltre sollevando dubbi sul bando (emesso o no?, questo non lo sappiamo non avendone copia) inerente alla … pubblicità (brochure e depliant illustrativi) degli spettacoli del Foglietti in programma nei prossimi mesi. E prima, o dopo, essere scesi nel particolare con dati in più della faccenda tra circa 24 ore, auspichiamo una semplice risposta chiarificatrice.


    Source: Irriverentemente.

  • How Closures Work in JavaScript: A Handbook for Developers

    How Closures Work in JavaScript: A Handbook for Developers

    November 25, 2025
    Software

    If you’re learning JavaScript, you’ve probably heard the term “closure” at some point. In many developers’ experience, just hearing this word can trigger anxiety. In nearly 17 years of programming experience, I’ve noticed that closures are one of the most intimidating topics for JavaScript developers, even though they shouldn’t be.

    The main goal of this handbook is to remove that fear. By the end of this guide, you should be able to confidently say, “I’m not afraid of closures anymore!”

    Closures aren’t actually that complicated at all when you break them down. They just might seem harder to grasp while you don’t understand them clearly. Many articles or tutorials don’t explain the topic deeply, which leaves you confused, asking questions like, “What exactly is a closure?” or “What does it really mean?”

    Throughout this handbook, I’ll walk you through several examples step by step. If you stick with this guide until the end, I promise – all your confusion about closures should disappear.

    1. Prerequisites

    2. Project Setup Before Learning Closures

      • Create a New Project Folder

      • Create the index.html File

      • Create the script Folder + Seven Example Files

      • Very Important Note

      • Run the Project

    3. Functions and Parameters – The Basics

    4. Accessing Variables Without Parameters

    5. Understanding Scope and Lexical Scoping

    6. What is a Closure?

    7. Functions as Objects

    8. The Function-Parent Relationship

    9. Nested Functions and Closures

    10. Refining the Example

    11. Creating Private Properties with Closures

    12. The Role of Closures in Privacy

    13. Understanding Closure Mechanics

      • How Closures Make Decisions
    14. Closures and Enclosing Scopes

      • The Documentation Definition

      • The Enclosing Scope Concept

      • Interpreting the Closure Definition

    15. Practical Example – Self-Contained Closures

      • Understanding References
    16. The Difference Between var and let

      • Understanding var and let Scoping

      • Observing the Difference

      • Using IIFE with let

    17. Understanding Closures Through a Practical Stopwatch Example

      • Defining the Stopwatch Function

      • Using the Stopwatch

      • Calling the Timer Function

      • Inspecting the Timer Function

      • Closures and Garbage Collection

    18. Closures in Asynchronous Code

      • Basic Asynchronous Example with setTimeout

      • External Function Reference Example

    19. Practical Example: API Requests with Closures

      • Refactoring with External Function
    20. Advanced Example – Closures in Loops

      • Synchronous Loop Example

      • Asynchronous Loop Example

      • The var vs let Problem

      • Using console.dir with Loop Closures

      • The var Loop Problem

      • Fixing the var Loop Problem with IIFE

    21. Summary and Key Takeaways

      • What is a Closure?

      • The Main Ideas in This Guide

      • The Importance of Closures

    22. Final Words

    Prerequisites

    To follow along and get the most out of this guide, you should have:

    1. Basic JavaScript (ES6-style) knowledge

    2. Familiarity with browser developer tools

    3. Comfort with asynchronous code (promises)

    4. Basic ability to use the terminal/command line

    5. Familiarity with a code editor like VS Code – Live Server extension (for running HTML files locally)

    I’ve also created a video to go along with this article. If you’re the type who likes to learn from video as well as text, you can check it out below.

    Project Setup Before Learning Closures

    Closures are an amazing concept in JavaScript. But if you jump into the code without preparation, they can feel a bit intimidating.

    So before we start exploring closures, let’s set up a simple, clean project where you can test each example comfortably. Once this setup is done, you won’t need to repeat it again and again throughout the article. So follow along carefully and you’ll prepare everything at once.

    Create a New Project Folder

    Open your terminal and run:

    mkdir closure cd closure 

    This folder will contain your main HTML file and all the JavaScript examples.

    Create the index.html File

    Now create the HTML file:

    touch index.html 

    Open index.html and add the following code:

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Closure Tutorial | LogicBase Labs</title> </head> <body> <script src="./script/example-1.js"></script> <script src="./script/example-2.js"></script> <script src="./script/example-3.js"></script> <script src="./script/example-4.js"></script> <script src="./script/example-5.js"></script> <script src="./script/example-6.js"></script> <script src="./script/example-7.js"></script> </body> </html> 

    Why so many <script> tags?

    Good question! In this tutorial, you’ll explore closures in 7 different ways. Each example will live in its own JavaScript file, so things stay clean and beginner-friendly. If you tried to put everything inside one file, the outputs would get mixed up and confusing. That’s why you’re loading each example separately.

    Create the script Folder + Seven Example Files

    Let’s create a folder named script:

    mkdir script cd script 

    Now create the seven example files:

    touch example-1.js touch example-2.js touch example-3.js touch example-4.js touch example-5.js touch example-6.js touch example-7.js 

    You’ll write and test each closure example inside these files.

    Very Important Note:

    If all 7 files run at the same time, your console output will get mixed up. You won’t understand which message came from which example.

    So here’s the rule:

    • When working on example-1.js, comment out the rest.

    • When working on example-3.js, uncomment that one only, and comment out the others.

    Example:

    <!-- <script src="./script/example-1.js"></script> --> <!-- <script src="./script/example-2.js"></script> --> <script src="./script/example-3.js"></script> <!-- <script src="./script/example-4.js"></script> --> <!-- <script src="./script/example-5.js"></script> --> <!-- <script src="./script/example-6.js"></script> --> <!-- <script src="./script/example-7.js"></script> --> 

    This keeps your output clean, clear, and conflict-free.

    Run the Project

    Open Live Server from VS Code and you’ll see: http://127.0.0.1:5500/closure/index.html

    This is your working route. Inside this project, you’ll explore the full world of closures step by step. Now you’re ready to dive into closures and learn what they are, how they work, and why closures are one of the most powerful concepts in JavaScript.

    Functions and Parameters – The Basics

    So now you will mainly work on the example-1.js file. Listen, throughout this entire handbook, you will first write the full code, and then we’ll go line by line to understand the breakdown in detail. There’s nothing to worry about: we will uncover every single thing in its full depth.

    Full code: example-1.js

    // example-1.js function sum(num1, num2) { return num1 + num2; } console.log(sum(2, 3)); 

    Usually, when you want to use an outside variable inside a function, you pass it as a parameter. For example, consider a function called sum:

    function sum(num1, num2) 

    Here, two numbers are taken as parameters. To add these numbers and return the result:

    return num1 + num2; 

    To see the output:

    console.log(sum(2, 3)); 

    The output will be 5. Simple, right?

    Accessing Variables Without Parameters

    Full code: example-1.js

    var num1 = 2; var num2 = 3; function sum() { return num1 + num2; } console.log(sum()); 

    But in JavaScript, there’s a way to do the same thing without passing parameters. Let’s remove the parameters from the sum function. Instead, you’ll define two variables in the global scope:

    var num1 = 2; var num2 = 3; 

    Now, when you call sum(), the output will still be 5.

    The question is: “how does JavaScript do this?” It seems strange, right? Inside a function, you’re using variables that don’t actually belong to that function – they exist outside in the wider environment where the function was created. In simple terms, the function is using variables from its parent scope.

    Understanding Scope and Lexical Scoping

    This concept relates to one of the most fundamental principles in JavaScript: everything from a parent is accessible to the child. If there were nested functions inside this function, even the deepest child function could access variables like num1 and num2 from the parent. The parent’s variables are fully accessible to the child, but nothing from the child can be accessed by the parent.

    I’ve already covered this topic in a detailed video on JavaScript Scope on the LogicBase Labs YouTube channel. If you’d like to revisit the concept or get a quick refresher, you can watch the video below.

    For example, if you define a new variable inside the sum function, it cannot be accessed from outside the function. This is the core idea of scope. This system of scope is theoretically called Lexical Scoping. Since today’s topic is Closures, understanding scope is essential, as closures and scope are deeply connected.

    According to lexical scoping, a child function can access its parent’s variables, but a parent cannot access the child’s. This isn’t random – it’s a specific convention or guideline in JavaScript.

    What is a Closure?

    The word “closure” literally means a “bond” or “enclosure.” Think of it like keeping a variable safely locked away, just like storing something inside a box.

    Even though the box is closed, you can still use its contents when needed. This is why it’s called a closure: because you keep a function’s variables enclosed in such a way that, even if the outside world cannot access them directly, the function itself can still use them whenever required.

    Functions as Objects

    In JavaScript, whenever you write a function, the function is actually treated as an object. Every function in JavaScript works as an object. Just as you can console.log an object to see it, you can also inspect a function.

    Let’s print our sum function:

    console.dir(sum); 

    Notice that you’re not calling the function. Rather, you’re just printing its body. You use dir instead of log because console.log only shows the function body, while console.dir displays the function as an object, letting you see each of its properties one by one. You can think of it as an upgraded version of console.log.

    Looking at the output, you’ll see an object. Expanding it reveals many properties, like name, length, prototype, and more. At the very bottom, there’s a property called Scopes. Inside Scopes, there’s a section named Global containing further details. The Scopes property is what we’ll mainly focus on here.

    The Function-Parent Relationship

    Notice something here: the sum function has its own world, right? So why is it still referencing the global scope?

    Every function actually maintains a connection with its parent environment. It doesn’t just live in its own world – it keeps a link to the environment where it was created. Simply put, it always holds a reference to its parent.

    Why does it do this? Because if anything changes in the parent environment (like a variable’s value or the need to use it inside the function), the function can still access it.

    This whole process is the core concept of a closure. A function keeps track of the variables it uses from outside its own scope by closing over its parent, and its parent’s parent – essentially the entire scope chain above it – holds them as references.

    That’s why this example is actually the simplest form of a closure. The sum function itself is a closure because it has captured some variables from its outer environment and can use them whenever needed.

    Even though you often see closures explained with examples where “a function is inside another function,” the fundamental idea starts here: “any function that retains access to variables from its outer scope is, in essence, a closure.”

    Nested Functions and Closures

    Full code: example-1.js

    // example-1.js var num1 = 2; var num2 = 3; function sum() { return function () { return num1 + num2; }; } var myFunc = sum(); console.dir(myFunc); 

    You can understand this even more clearly by tweaking the previous sum function. Instead of directly returning a value, you’ll have the sum function return another function:

    return function () {}; 

    And inside this inner function, you write:

    return num1 + num2; 

    So what does this mean? The sum function is no longer returning a value directly. Instead, it’s returning a function.

    Now, create another variable called myFunc:

    var myFunc = sum(); 

    You called the sum function, and whatever it returned (the inner function) is now stored in myFunc. In other words, myFunc is essentially the inner function returned by sum.

    If you print myFunc to the console:

    console.dir(myFunc); 

    You’ll see num1 and num2 listed as variables in the output. This function is still holding onto its global environment. Even though it’s an inner function, it’s still connected to the global scope and maintains the same global references as before.

    Nested Function and Closure

    Refining the Example

    Full code: example-1.js

    // example-1.js var num1 = 2; function sum() { var num2 = 3; return function () { return num1 + num2; }; } var myFunc = sum(); console.dir(myFunc); 

    Now, remove the num2 variable from the global scope and define it inside the sum function instead.

    Refine the closure

    This time, in the browser, you can clearly see something labeled “Closure.” In other words, the browser is directly showing that a closure has been created inside this function.

    In older versions of Chrome, you would have seen “Closure” in the previous example too. But in the newer versions, it shows as “Global” until a function actually closes over another function. When a function is returned from within another function, that’s when the browser displays “Closure.” But keep in mind that theoretically, the previous example was also a kind of closure. The difference is just in how the browser presents it.

    When you did console.dir(myFunc), you saw that this inner function is using both num1 and num2:

    • num1 is in the global scope

    • num2 is inside the sum function’s scope

    So what is this inner function doing? It’s taking a reference to num1 from the global scope and at the same time taking a reference to num2 from its parent function, sum. In other words, this inner function now carries two worlds within it: one is the global scope, and the other is its parent scope. This is exactly what a closure does: it keeps all the outer scopes it needs “enclosed” so it can use their variables whenever necessary.

    In the browser, you can see that inside this closure, num2 exists, while num1 remains in the global scope. So num1 is no longer part of the closure. What does this mean? The function only carries the parts of the environment it actually needs for its execution. Simply put, it takes all the variables it needs, along with their references, as a compact package.

    Think of it like the function holding onto references: whenever any of these variables are updated, the function can see those changes because it’s still connected to the same references.

    If you called myFunc = sum() once and keep calling sum() repeatedly, there’s no problem. Each time, a new function will create its own separate scope and keep a reference to that scope. You defined a function and then called it elsewhere. Every time you call that function, it can still access the data from its previous scope. That’s because every function preserves all the information from its parent scope as references. This is exactly how a function remembers its outer variables – and this is what a closure is.

    Creating Private Properties with Closures

    So far, all the examples you’ve seen were very simple. Now, let’s look at a practical example that will help you understand closures better and clear up any confusion.

    Think about other programming languages for a minute: when you want to create a private property, what do you usually do? You define a property inside a class and mark it as “private” so that no one can access it directly from outside the class. Then, inside the class, you create one or more public functions (like getters or setters) which allow controlled access to or modification of that property. In other words, you can’t touch the property directly from outside – you can only interact with it through specific functions defined inside the class.

    In JavaScript, you can achieve the same idea much more simply using closures, entirely in a functional style.

    Creating private property

    How? Let’s see an example. Suppose you have a simple function:

    Full code: example-2.js

    // example-2.js function bankAccount(initialBalance) { var balance = initialBalance; return function () { return balance; }; } var account = bankAccount(100000); console.log(account()); console.dir(account); 
    function bankAccount(initialBalance) {} 

    You’ve named it bankAccount, and it takes the user’s initial balance as a parameter.

    Inside it, define a variable:

    var balance = initialBalance; 

    So, the user’s initial balance is stored internally in a variable called balance. Next, return a function that returns this balance variable. In other words, the balance can only be accessed through this returned function.

    Outside, in the global scope, create a variable:

    var account = bankAccount(100000); 

    Here, you called the bankAccount function and passed 100000 as the initial balance. What is this function actually doing? It’s returning another function. So now, the account variable holds that returned function.

    If you write in the console:

    console.log(account()); 

    The output will be 100000.

    Private Property Output

    But if you try this:

    console.log(balance); 

    it won’t work, because the balance variable cannot be accessed from outside.

    Error Output

    What does this mean? The balance property is protected or private. No one from the outside can directly touch it. To see the balance, you can only call the returned function inside the original function. This is how you keep balance as a private variable and control access to it.

    The Role of Closures in Privacy

    So, what’s the role of the closure here? It’s exactly what makes this possible. The inner function is the closure. If you write:

    console.dir(account); 

    You’ll see that inside the account function is the returned function.

    By taking the output and expanding it, you’ll see that the balance variable exists inside the closure. Exactly, right? This means that balance wasn’t created inside the account function itself – it was created one scope level up. Yet, you can still access balance from the returned function.

    It’s similar to the previous example, but this use case is slightly different. Here, you’re showing how a private property can be kept secure. Even though you called the inner function from the outside, it still had access to balance within its scope. So, the outer scope cannot directly access balance, but thanks to the closure, you can maintain a reference to it. Even though the function is called from outside, the closure allows you to access the private property in a protected way.

    Why protected? Because you’re not accessing it directly – you can only see balance through the function call.

    💡This is another powerful use case of closures: securing private properties so that they can’t be directly accessed from outside, but only through specific functions.

    Understanding Closure Mechanics

    How Closures Make Decisions

    Now, let’s look at another aspect of closures. We’ll revisit our first example.

    Previous code: example-1.js

    // example-1.js var num1 = 2; function sum() { var num2 = 3; return function () { return num1 + num2; }; } var myFunc = sum(); console.dir(myFunc); 

    In that example, you used a variable called num2 inside the inner function. That’s why the function acted as a closure, right?

    Full code: example-3.js

    // example-3.js var num1 = 2; function sum() { var num2 = 3; return function () { return num1; }; } var myFunc = sum(); console.dir(myFunc); 

    Now, keep the variable but stop using num2 inside the inner function. If you check the output, you’ll see that the closure is gone. Why?

    Closure Gone Output

    It’s because num2 isn’t used inside the inner function. JavaScript smartly recognizes that this variable isn’t needed, so it’s not included in the closure. In other words, JavaScript decides on its own: variables that won’t be used inside the function, even if they exist in the outer scope, are not included in the closure. Only the variables that the function actually needs become part of the closure.

    Full code: example-3.js

    // example-3.js var num1 = 2; function sum() { var num2 = 3; var num = 6; return function () { return num; }; } var myFunc = sum(); console.dir(myFunc); 

    For example, if you define another variable inside the sum function:

    var num = 6; 

    and do nothing else, there’s still no need for a closure. But if you modify the inner function to return num instead of num1, the closure appears again. This time, the closure contains only num. num2 won’t be there, but num1 remains because it exists in the global scope. JavaScript preserves this scope to maintain lexical scoping.

    Closure with num Output

    If you look at the global scope, you can still see num1. That’s because you used the var keyword. If you had used let, it wouldn’t be visible. The key difference you’re noticing is: num1 exists in the global scope, so it remains in the closure’s “environment,” but if a variable inside the inner function isn’t used, it’s not included in the closure.

    For example, if you use num1, you’re accessing the global variable. So what happens now? Will there be a closure? Look, there isn’t one. Since num1 exists in the global scope, there’s no extra need. The global scope is sufficient, and no separate closure is required. This shows how closures actually work.

    No Closure with Global Output

    A closure decides which variables need to be kept inside the function and which don’t. JavaScript makes this decision automatically. You just need to remember lexical scoping so that outer scope variables can be accessed.

    In simple terms, closures make intelligent decisions. Variables used inside the function are kept “inside,” variables in outer scopes that aren’t used aren’t included, and global variables are accessible directly, so there’s no need to include them in the closure.

    So here, you kept num1, and it exists in the global scope. The function can access it directly from there. But if the inner function used only num – which doesn’t exist in its own scope or globally – then a closure would have to be created to carry that variable along.

    In short, a closure doesn’t wrap everything. It doesn’t include variables that are already outside. This is an important point. Another important point is that global scope variables are never included in closures.

    Closures and Enclosing Scopes

    The Documentation Definition

    Often, there’s some confusion about when a closure appears and when it just shows global. Even senior interviewers sometimes hesitate to call the global scope a closure at first glance.

    If you look at the JavaScript documentation maintained by Mozilla, the 2016 docs highlighted something important.

    In the definition, it stated:

    “variables that are used locally, but defined in an enclosing scope” (Reference)

    This refers to variables that are used locally inside a function but are actually defined in an outer scope. This is key. Only variables that are actually used inside a function are included in the closure. Variables that exist in an outer scope but aren’t used inside the function aren’t part of the closure.

    In simple terms, a closure is a function that remembers its local scope along with the necessary variables from an outer scope, so even if the function is called from outside, it can still access those variables.

    The Enclosing Scope Concept

    Suppose you have a variable num defined outside, but you use it locally inside the function. That’s why the browser shows it as a closure, just like the documentation says.

    Full Code: example-3.js

    // example-3.js var num1 = 2; function sum() { var num2 = 3; return num1 + num2; } console.dir(sum); 

    But if you don’t use the outer variable inside the returned function, what happens? If you removed everything else and just returned num1 + num2, the sum function would work fine. But if you do console.dir(sum), the word “closure” doesn’t appear.

    Why? Because num2 is local inside the function, and there’s no need to include it in a closure. A closure is only needed to use variables from an outer scope. Since this is the very first-level outer scope (meaning the global scope) and it’s not inside any function, the sum function is already capturing it in its own scope. So no additional closure is created.

    The critical question is: “when does the browser show a closure, and when doesn’t it?” The explanation comes from the documentation: “variables that are used locally, but defined in an enclosing scope.” Your num1 variable is defined outside but used locally inside. But num1 doesn’t have any enclosing scope. Here, an enclosing scope means a scope that wraps around another scope – inside a set of brackets. But num1 is directly in the global scope, not inside any enclosing scope.

    Full code: example-3.js

    // example-3.js (function () { var num1 = 2; function sum() { var num2 = 3; return num1 + num2; } console.dir(sum); })(); 

    If you want to bring this into an enclosing scope, you need to wrap the whole thing inside a function. You can write an anonymous function like this:

    function(){} 

    Then you put everything inside that function and immediately call it. This is known as an Immediately Invoked Function Expression (IIFE for short). It’s basically a function that gets defined and executed at the same time.

    When you use an IIFE, everything gets moved into an enclosing scope. The num1 that was previously open in the global scope is now inside this function. So it’s now part of an enclosing scope. If you check in the browser and expand it, you see the word “closure.”

    Closure with Enclosing Scope Output

    That’s because you’ve brought the variables into an enclosing scope. The browser now shows it as a closure.

    Interpreting the Closure Definition

    If someone ever gets confused or disagrees, they might say, “The outer one isn’t a closure, it’s just the global scope.” But theoretically, you can still consider it a closure. Some might insist, “That’s a closure,” while others may not agree.

    The thing is, JavaScript always keeps the global scope intact to maintain lexical scoping. People who disagree might say, “The global scope is just preserved, that’s not a closure.” And that’s fair. But the concept is really the same. If a variable from an outer scope is used or referenced inside a function, it behaves just like a closure. The idea is consistent.

    There’s a small difference though: the global scope keeps all variables that exist outside any function. That’s why some might argue it’s not technically a closure. But from a theoretical perspective, it behaves like one, with only minor differences for global variables.

    Full code: example-3.js

    // example-3.js var num1 = 2; function sum() { var num2 = 3; return num1 + num2; } console.dir(sum); 

    If you didn’t use an IIFE and went back to the previous setup, the browser would no longer show it as a closure. And the var num1 is in the global scope.

    No Closure with Global Output

    If you add another variable:

    var num3 = 5; 

    This num3 isn’t used by the sum function, but if you look in the global scope, you can still see it. The browser shows num3 as well.

    Global Scope with num3 Output

    But a closure only keeps what’s necessary. Here, num3 exists because it’s part of the global scope. The global object always holds references to its own variables, which is why num3 is visible. This often causes confusion: should you call it a closure or not?

    The point is, in the 2016 documentation, the term “enclosing scope” was clearly mentioned. In the current documentation, that phrase is missing. This means they’ve intentionally avoided that confusion.

    The modern definition now says, “closure is the combination of a function bundled together with references to its surrounding state” which is written more concisely compared to before. (Reference)

    Here, “state” refers to the lexical environment – that could be the child’s environment, the parent’s environment, or the entire scope. Based on this definition, a function keeps itself along with any variables it needs to remember, all bundled together. Explaining this clearly in words can be tricky. But you’ll see more examples ahead, which will make each use case clear.

    Practical Example: Self-Contained Closures

    Full code: example-3.js

    // example-3.js (function () { var num1 = 2; var num2 = 3; function sum() { return num1 + num2; } console.log(sum()); console.dir(sum); })(); 

    Let’s look at another aspect. You’re going back to the IIFE function. Here, you have a function called sum that adds num1 and num2 and returns the result. Both num1 and num2 exist inside the IIFE function. This means you’ve kept the whole setup self-contained within a closure function.

    When you call the sum function:

    console.log(sum()); 

    and on the next line write:

    console.dir(sum); 

    Check the output. Initially, 2 + 3 gives 5, which is exactly what you see. Since num1 and num2 now exist inside the global scope of the IIFE.

    IIFE Closure Output

    Full code: example-3.js

    // example-3.js (function () { var num1 = 2; var num2 = 3; function sum() { return num1 + num2; } console.log(sum()); console.dir(sum); num1 = 6; num2 = 7; console.log(sum()); console.dir(sum); })(); 

    You can modify these variables if you want:

    num1 = 6; num2 = 7; 

    Then if you call again:

    console.log(sum()); console.dir(sum); 

    You’ll see two different results. The first call returns 5 because initially 2 + 3 was calculated. After changing num1 and num2, the next call returns 13. So, you can see that a closure keeps hold of the outer variables and makes them accessible inside the function, right?

    IIFE Closure with Updated Values Output

    Now, at that moment, you checked the function using console.dir. First, expand the dir at the bottom. Here, you see an entry labeled “closure,” and inside it, you notice num1 = 6 and num2 = 7. Great, because before writing dir, you had changed the values of num1 and num2, so it’s showing the latest values. But if you go back to the previous state and expand the first console.dir, surprisingly, it still shows num1 = 6 and num2 = 7. Both are the same – pretty weird, isn’t it?

    This is because when you did console.log, the result showed 2 + 3. But in the very next line, the values hadn’t actually changed yet. In console.dir, you see that inside the closure, the values remain 6 and 7.

    Closure with Updated Values Dir Output

    This is exactly what I’ve been emphasizing: a closure doesn’t really hold the values themselves. It holds a reference to the variables.

    Understanding References

    So, what does this mean? It means that there’s a pointer stored to the memory location of your variable. Once a reference is stored, the pointer itself stays the same, but the value can change anytime.

    When you use console.dir, the browser is showing that reference, which is why it always displays the latest value. The browser works very fast, and the reference has already been updated. When you set num1 and num2 to 6 and 7 inside the closure, the reference gets updated. You’re seeing the exact same variable, but you don’t see the intermediate values. But when you do console.log, the function uses its corresponding value correctly. That’s why not every change in the intermediate scope is clearly visible. Because of reference updates, you always see the latest value, not the direct intermediate state.

    Closure Reference Output

    So, to reiterate: a closure doesn’t store the actual values inside. It stores references to those values.

    Keeping this concept in mind is really crucial.

    The Difference Between var and let

    Full code: example-3.js

    // example-3.js var num1 = 2; var num2 = 3; function sum() { return num1 + num2; } console.dir(sum); 

    Now, let’s look at another aspect of closures. Earlier, you declared two variables in the global scope: num1 and num2. So far, you’ve been using the var keyword. If you don’t put anything inside an IIFE and just stay in the global scope, you won’t see any closure in the browser.

    No Closure In Global Output

    But where do num1 and num2 live? Well, in the global scope. That’s why you write console.dir(sum). In the browser, you can see num1 and num2 inside the global object.

    Here’s the interesting part: what happens if you replace these var keywords with let?

    Understanding var and let Scoping

    Full code: example-3.js

    // example-3.js let num1 = 2; let num2 = 3; function sum() { return num1 + num2; } console.log(sum()); console.dir(sum); 

    This is where the difference between var and let comes in. Many people think they’re the same, but in JavaScript, var and let are not equal.

    Simply put:

    • var is the old JavaScript declaration, and it’s function-scoped. A variable declared with var only lives inside the function it’s defined in. If it’s defined outside any function, it goes to the global scope.

    • let is the new ES6 declaration, and it’s block-scoped. A variable declared with let only exists within the block or scope where it was defined and cannot be accessed from outside.

    One important difference is hoisting. Variables declared with var are hoisted, meaning JavaScript moves the declaration to the top, but the initialization doesn’t happen. So if you use a var before it’s declared, you’ll get undefined. With let, even though it’s hoisted, the temporal dead zone ensures that using it before declaration throws an error.

    Observing the Difference

    Let’s see what happens if you declare the variable with let. Last time, when it was just in the global scope, you could see the variables when you did console.dir. Now, though, you see a new object named script has appeared, and num1 and num2 are no longer in the global scope.

    Let Scope Output

    Why is that? It’s because of the difference between let and var that you talked about earlier. let is block-scoped, while var is function-scoped. If you treat the outer context as a main function, a variable declared with var becomes part of the global scope. But with let, it stays within its block scope and doesn’t directly become part of the global object. So let actually lives inside a separate object called script and not in the global scope.

    Understanding this is really important, because if you’re following along with this handbook and you’re trying to print variables while using let out of habit, the output won’t be like it is with var. This can definitely be confusing. Simply put, let doesn’t go into the global object. It exists inside a separate script object.

    Using IIFE with let

    Full code: example-3.js

    // example-3.js (function () { let num1 = 2; let num2 = 3; function sum() { return num1 + num2; } console.dir(sum); })(); 

    But what if you wrap the whole thing in an enclosing function again, like before with an IIFE? When you check the output now, everything goes back inside its closure.

    Closure with Let in IIFE Output

    Ultimately, the concept of closures remains the same: what changes is whether the variable goes into var or let scope.

    Now the situation becomes a bit simpler. You have a function, and it’s in its end-closing state. According to the definition of a closure, the inner function of this function is using the outer variable num1. So, this inner function definitely needs a closure. That closure comes from exactly this function.

    JavaScript creates the closure and packages num1 inside it. The outer global world always exists separately, of course. Also remember, when using console.dir in the browser, the output will look different depending on whether you’re dealing with let or var.

    Understanding Closures Through a Practical Stopwatch Example

    So far, all the examples you’ve seen were very simple. Now, let’s look at a practical example that will help you understand closures better and clear up any confusion.

    Full code: example-4.js

    // example-4.js function stopWatch() { var startTime = Date.now(); var getDelay = function () { console.log(Date.now() - startTime); }; return getDelay; } var timer = stopWatch(); for (let i = 0; i < 100000000; i++) { var a = Math.random() * 1000000; } timer(); 

    Defining the Stopwatch Function

    Let’s define a function:

    function stopWatch() {} 

    You’ve named it stopWatch, and it works just like a real stopwatch. Just like when you start a stopwatch, wait for a while, and then stop it to get the elapsed time, this function will do the same.

    First, write:

    var startTime = Date.now(); 

    This stores the current time in startTime. Then, inside the function, define:

    var getDelay = function () {}; 

    Create a getDelay function, which will log the elapsed time to the console. For that, write:

    console.log(Date.now() - startTime); 

    Here, the elapsed time is calculated by subtracting startTime from the current time. Finally, simply return this getDelay function. The stopWatch function does just one thing: when you call stopWatch, it starts a stopwatch using Date.now() and returns a getDelay function. When you call that getDelay function, it shows the elapsed time from the start time to the current moment.

    Using the Stopwatch

    Now, call it. Write:

    var timer = stopWatch(); 

    Here, you’ve started the stopWatch. This function executes, which means startTime is set and the getDelay function is defined. Then, stopWatch returns that getDelay function. The stopWatch function itself isn’t called directly afterward – you simply called it once, and the outer function returns the getDelay function. Store this returned function in timer.

    At this point, the stopWatch is already running because you called it, but you haven’t printed anything from getDelay yet. Before calling getDelay, create a fake delay like this:

    for (let i = 0; i < 100000000; i++) {} 

    Use a large for-loop to waste some time. You chose a big number intentionally so it takes a noticeable delay. If you want, you can also perform some expensive operations in the loop, like calculating a random number:

    var a = Math.random() * 1000000; 

    This way, you create a fake delay.

    Calling the Timer Function

    Now, we come to timer. Timer is actually a function because it was returned by calling stopWatch. This returned getDelay function acts as your actual timer. Let’s call timer() and see what happens. The output doesn’t appear instantly – it takes a moment, and then it shows up. So you get a delay.

    Stopwatch Output

    The question is: how is this still working? The stopWatch function, where you initially called it, has already finished executing. That means everything inside that function should be gone.

    So how does timer() still know the value of startTime? Especially after you added such a long delay before calling it? This means the timer function still remembers its parent function – specifically, the startTime variable inside stopWatch. It holds onto that reference.

    How? Because of a closure. When getDelay was created, a closure was also created inside it that kept track of the startTime variable. So even after the delay, and even after a long time, it can still use that old value. This shows that JavaScript is really smart. It tracks all variables, references, and closures, and when needed, it can use them again. This is why this behavior is possible: because of closures.

    Inspecting the Timer Function

    Full code: example-4.js

    // example-4.js function stopWatch() { var startTime = Date.now(); var getDelay = function () { console.log(Date.now() - startTime); }; return getDelay; } var timer = stopWatch(); for (let i = 0; i < 100000000; i++) { var a = Math.random() * 1000000; } timer(); console.dir(timer); 

    If you do:

    console.dir(timer); 

    like before and check the output in the browser, you’ll notice it takes some time to appear because of the delay. But even after the delay, it still retains startTime inside the closure.

    Timer Closure Output

    If you try:

    console.log(startTime); 

    you won’t be able to access startTime directly. But since timer is a member function, it can use that startTime you initialized long ago, before the for-loop. It still remembers startTime. No matter how long the delay, it can keep track. Even if there were more lines of code or more expensive operations during the delay, at the end of the day, when you call the timer, the closure ensures that startTime is correctly preserved.

    This is one of the more fascinating aspects of JavaScript: it can really remember such information, and this is one of the biggest use cases of closures.

    Closures and Garbage Collection

    This is one of the most powerful features of closures. Because of closures, no matter how many times you call the timer() function, each call works independently and keeps its own reference. Every time, a new reference is created and held as long as it’s needed.

    Let’s consider a small example – but imagine in a large application, there could be countless closures holding references to many variables. Naturally, the question arises: if so many things are being remembered, will performance suffer?

    This is where JavaScript’s performance optimization comes in. JavaScript is a smart, garbage-collected language. That means when JavaScript realizes that a reference or variable is no longer needed, it automatically removes it from memory.

    In some situations, programmers can manually optimize. For example, if you created a timer holding a reference to a getDelay() function, but you haven’t called getDelay() yet, JavaScript doesn’t know if it will be used in the future, so it keeps the reference.

    Full code: example-4.js

    // example-4.js function stopWatch() { var startTime = Date.now(); var getDelay = function () { console.log(Date.now() - startTime); }; return getDelay; } var timer = stopWatch(); for (let i = 0; i < 100000000; i++) { var a = Math.random() * 1000000; } timer(); console.dir(timer); timer = null; timer(); 

    If you’re certain it won’t be used anymore, you can manually clear the reference by writing:

    timer = null; 

    Now, timer() won’t work because you set it to null. JavaScript understands that it’s no longer needed and garbage collects the reference from memory. If you try this in the browser, you’ll see an error: “TypeError: timer is not a function” – because timer is now null.

    Timer Null Error Output

    Simply put, setting timer = null tells JavaScript, “This variable won’t be used anymore, forget it.” The Garbage Collector then recognizes that there are no references and quietly removes it from memory, preventing memory waste.

    The interesting part is that JavaScript doesn’t just run the code – it predicts a lot even before compilation. When it sees timer = null, it already knows, “Okay, the programmer used this timer only this much, and it won’t be needed anymore.” So as soon as the code finishes running, it intelligently cleans up the memory.

    This makes your program automatically optimized. There are no memory leaks, browser load decreases, and JavaScript executes faster. This is a very small example, but it already shows how elegantly you can manage performance in JavaScript.

    Closures in Asynchronous Code

    So far, all the examples you’ve seen were using closures in a synchronous way. Now, many people might wonder, “Okay, but how do closures work in asynchronous situations?”

    That’s a very good question. In real-world coding, most tasks run asynchronously – like with setTimeout, fetch, or event listener functions. The key point is, synchronous code executes line by line, but asynchronous code takes some time to complete. That means you call a function, but its result arrives a little later.

    So the question is: if the outer scope has already finished by then, how does the inner function still remember the values of the outer variables?

    This is exactly where the true power of closures comes in. A closure keeps the reference to the outer scope as long as the inner function hasn’t executed yet. That means whether the code is synchronous or asynchronous, closures work the same way.

    Asynchronous Closures

    Basic Asynchronous Example with setTimeout

    Full code: example-5.js

    // example-5.js function asyncExample() { var a = 20; setTimeout(function () { console.log(a); }, 3000); } asyncExample(); 

    Now let’s see a small asynchronous example to understand how closures work and why they are just as reliable in asynchronous scenarios.

    Define a function:

    function asyncExample() {} 

    Inside this function, write:

    var a = 20; 

    You’ve defined a variable. Next, use JavaScript’s built-in setTimeout function:

    setTimeout(function () {}); 

    setTimeout takes two parameters: one is the function to run, and the other is the time in milliseconds, meaning it will call that function after the specified delay.

    Now, suppose you put console.log(a) inside that function. Surprisingly, even though a isn’t defined inside the timeout function, it can still access the a from asyncExample‘s outer scope. This is possible because of closures. After 3 seconds, it appears, and you see 20. This is also possible because of closures. The function inside setTimeout doesn’t have a defined within itself, yet it can access a from asyncExample‘s scope.

    Asynchronous Closure Output

    External Function Reference Example

    Full code: example-5.js

    // example-5.js function asyncExample() { var a = 20; function myFunc() { console.log(a); } setTimeout(myFunc, 3000); console.dir(myFunc); } asyncExample(); 

    Now, what if you define the setTimeout function outside asyncExample, just for demonstration – like this:

    function myFunc() {} 

    Inside myFunc, write:

    console.log(a); 

    Then pass myFunc into setTimeout and also write:

    console.dir(myFunc); 

    If you check the output of console.dir, you’ll see that inside myFunc, the closure contains the variable a=20. This is because a was part of asyncExample‘s scope, so myFunc can still access it.

    Asynchronous Closure with External Function Output

    Just like before, this is possible thanks to closures. But here, there’s a subtle difference. Earlier, you talked about a reference example, but this reference works a little differently.

    Full code: example-5.js

    // example-5.js var a = 20; function asyncExample() { function myFunc() { console.log(a); } setTimeout(myFunc, 3000); console.dir(myFunc); } asyncExample(); a = 30; 

    Suppose the variable a=20 was originally inside asyncExample. Now, if you move a to the global scope and write:

    var a = 20; 

    In simple terms, you’ve defined it outside. Now, the closure won’t show it, because it’s part of the global scope. a will just exist in the global scope with a value of 20. You call the asyncExample function, which starts the setTimeout timer. Then, on the next line after calling asyncExample, you change the value of a:

    a = 30; 

    Now think: if myFunc is called as the callback for setTimeout and does console.log(a), what value will it show? If you check the output, it will show 30.

    Global Variable Asynchronous Closure Output

    What does this mean?

    When asyncExample is called, the setTimeout starts and myFunc is ready as the callback. Inside myFunc, you have console.log(a). At that moment, a was 20 in its parent scope. But since a is now global and its value has been changed from outside, when the callback executes, it shows 30.

    This demonstrates that closures actually hold a reference to the variable. If the variable is global, any external changes are also tracked. So if you expand the global a in the console, you’ll see a = 30.

    I mentioned earlier that closures keep a reference to the value. So when setTimeout sends the callback to the main thread after 3 seconds, myFunc can still access that reference. Remember, myFunc comes back via setTimeout from another place – it doesn’t run directly on the main thread. This is part of asynchronous JavaScript.

    The function is called in the main thread after returning from the Web API, but it still retains the reference to a. Since a has been changed globally, when myFunc prints it, it shows the new value 30.

    This point is very important. Practicing multiple examples will help you better understand how closures track outer variables in asynchronous situations. This is why you need to be careful when using global variables and var.

    This is also the reason var can sometimes cause conflicts, and why the let keyword was introduced. For example, if you define var a globally and later change a somewhere in the program, any asynchronous functions referencing a will use the new value. That’s why using var with setTimeout or other asynchronous functions can lead to such issues.

    💡An important point is that a closure doesn’t keep the entire variable from its parent scope. It only keeps a reference to that variable.

    Practical Example: API Requests with Closures

    Now, let’s see another practical example of closures. In typical JavaScript applications, you often make AJAX requests to fetch data from an API URL. We’ll see how closures are used in this context. For API requests like this, JavaScript’s built-in fetch function can be used, though third-party libraries like axios or jQuery AJAX can also accomplish the same task.

    Full code: example-6.js

    // example-6.js function apiFunction(url) { fetch(url).then((res) => { console.log(res); }); } apiFunction("https://jsonplaceholder.typicode.com/todos/1"); 

    Here, we’ll use fetch for a practical example. First, write a function:

    function apiFunction(url) {} 

    You’ve named it apiFunction and gave it a parameter called url. This function will send a request to that URL. Then you call the built-in fetch function:

    fetch(url); 

    So what does fetch do with the URL? Basically, fetch returns a promise. You know that to get the output from a promise, you use then. So you write:

    .then((res)=>{}) 

    After the response comes back, you use a callback function. Here, you log the response to the console:

    console.log(res); 

    This is how your apiFunction is set up.

    Now call the function. You need to pass a URL for the API call. A popular choice is jsonplaceholder, so use its /todos/1 endpoint:

    apiFunction("https://jsonplaceholder.typicode.com/todos/1"); 

    Check the output. Notice that it appears after a short delay-this is asynchronous.

    API Function Output

    To make this clearer, write another line below:

    console.log("I am here"); 

    Now the question is: which prints first? Without a doubt, “I am here” prints first, and then the output from apiFunction appears. This clearly demonstrates the flow of asynchronous operations. Since the response comes quickly, it might not have been obvious without this extra line.

    API Function with Log Output

    What does this mean? The output is coming, right? Here, the connection to closures is that you passed the url parameter from outside when calling apiFunction. This url now exists inside the body of apiFunction. fetch takes it as a parameter, and then the callback function inside then executes much later.

    By that time, the call to apiFunction has already finished, but the callback still remembers the variables from its scope. That’s why even after the result arrives, you can still access url. To see this, print it:

    console.log(url); 

    Notice that the output is correct. This means that if there were more nested functions inside then, like another then inside a then, all the way down, the innermost function could still access the original url. And this is possible only because of closures.

    API Function URL Output

    Refactoring with External Function

    Full code: example-6.js

    // example-6.js function apiFunction(url) { handleResponse = function (res) { console.log(res); console.log(url); }; fetch(url).then(handleResponse); console.dir(handleResponse); } apiFunction("https://jsonplaceholder.typicode.com/todos/1"); 

    To demonstrate, let’s rewrite the callback function inside apiFunction a little differently:

    function handleResponse(res) {} 

    This function simply does console.log(url). Now pass handleResponse into the then. Then write:

    console.dir(handleResponse); 

    In the output, you’ll see that inside handleResponse, the closure contains url. This is because it was part of apiFunction‘s scope, so it can access it.

    API Function with External Handler Output

    Advanced Example – Closures in Loops

    Finally, let’s look at another example that often comes up in job interviews. This one is a bit more complex and tricky, and it shows how using closures inside loops can create unpredictable output.

    Synchronous Loop Example

    Full code: example-7.js

    // example-7.js for (let i = 0; i < 3; i++) { function a() { console.log(i); } a(); } 

    Let’s write a simple for loop:

    for (let i = 0; i < 3; i++) {} 

    This loop will run three times, and inside it we’ll define another function:

    function a() {} 

    Inside this function, you simply do:

    console.log(i); 

    From this, you see that the function a exists within the scope of the for loop, but in reality, it’s also accessible in the global scope. Then you call the function a:

    a(); 

    The expected output would be 0, 1, 2. First, the value of i prints 0, then 1, then 2 – one after another. Looking at the output, you see 0, 1, 2. This is because you defined i using let.

    Synchronous Loop Output

    Full code: example-7.js

    // example-7.js for (var i = 0; i < 3; i++) { function a() { console.log(i); } a(); } 

    If you remove let and use var instead, what happens? Even with var, the output will be the same in this simple case because var works outside the block scope. Writing for (var i = 0) or declaring var i separately behaves effectively the same.

    // example-7.js var i; for (i = 0; i < 3; i++) { function a() { console.log(i); } a(); } 

    So in this case, there’s no problem. A closure isn’t required because you are running the function in the global scope. Your i prints 0, then 1, then 2, and everything works correctly.

    Asynchronous Loop Example

    Full code: example-7.js

    // example-7.js for (let i = 0; i < 3; i++) { setTimeout(function () { console.log(i); }, 1000 * i); } console.log("After for loop"); 

    Now let’s go back and use let for i again. Suppose you want to call the a function from outside the loop. Imagine you wrap the function call in a setTimeout, and in the first parameter you pass the body of a as a callback, while the second parameter is 1000 * i milliseconds.

    Using this 1000 * i, you want 0 to print after 1 second, 1 after 2 seconds, and 2 after 3 seconds. When you run this, the output comes exactly as expected: after 1 second, 0 prints; after 2 seconds, 1 prints; and after 3 seconds, 2 prints.

    But here’s the important point: the for loop itself is synchronous, while the functions inside setTimeout are asynchronous. That means the functions inside setTimeout will execute one by one according to the timer, only after the loop has finished. First after 1 second, then after 2, and then after 3.

    You can verify this asynchronous behavior. Suppose at the end of the loop you write:

    console.log("After for loop"); 

    Now, if you check the output, “After for loop” prints first, then after 1 second, 0 prints, after 2 seconds, 1 prints, and finally 2 prints. This clearly shows how asynchronous functions execute, right? No confusion there.

    Asynchronous Loop Output

    The var vs let Problem

    Full code: example-7.js

    // example-7.js for (var i = 0; i < 3; i++) { setTimeout(function () { console.log(i); }, 1000 * i); } console.log("After for loop"); 

    Now, let’s see what happens if you replace let i with var i. The interesting part is, if you use “var i” instead of “let i”, the behavior changes. All three outputs end up being 3. You don’t get 0, 1, 2 like before. That’s exactly the tricky part of this question.

    Var Loop Problem Output

    This question often comes up in job interviews because it’s a bit advanced, but if you understand closures and the difference between let and var scopes, it’s not complicated at all. You can analyze this by going back to let. Remove var and write:

    let i = 0; 

    Now the expected output is 0, 1, 2. let is block-scoped, meaning this i exists only inside the loop and has no effect outside.

    Let Loop Output

    During the first iteration, i is 0, and the setTimeout function is defined. This function will be called after the loop finishes, so a closure is used to remember the value of i. The callback needs a closure to reference i correctly. Since let doesn’t leak outside the loop, each iteration creates a new i. For example, when i becomes 1, it’s a completely separate i from the previous iteration.

    Full code: example-7.js

    // example-7.js var i; for (i = 0; i < 3; i++) { setTimeout(function () { console.log(i); }, 1000 * i); } console.log(i); console.log("After for loop"); 

    So, when this function runs the second time, it references this new i. But with var, the situation is different. var is function-scoped, so the same variable exists outside the loop. If you write:

    var i; 

    and then use the loop:

    for (i = 0; i < 3; i++) {} 

    there is only one i. Changing i inside the loop modifies the same i – no new i is created. So when the setTimeout callbacks execute, they all reference that same i. From previous examples, you know setTimeout callbacks run after the loop finishes. Now, after the loop ends, what’s the value of i? Since you used var, i has become 3.

    Check it with:

    console.log(i); 

    In the console, you’ll see 3 prints first. That means that when the callbacks execute, they all reference the same i, which is already 3.

    Var Loop Problem with Log Output

    So every console.log in the callbacks prints i = 3, which explains the output perfectly.

    Using console.dir with Loop Closures

    Full code: example-7.js

    // example-7.js // var i; for (let i = 0; i < 3; i++) { function myFunc() { console.log(i); } setTimeout(myFunc, 1000 * i); console.dir(myFunc); } console.log("After for loop"); 

    To understand this even better, you can use “console.dir” like before.

    Let’s see how. First, you’ll stick with the let case. So in the for loop you write:

    let i = 0; 

    You comment out the global “var i;” since let is block-scoped. Now let’s see how the closure works. The closure is created inside the setTimeout callback function, and you want to inspect this callback function.

    For that, you define:

    function myFunc() {} 

    and pass this myFunc inside setTimeout. Then, to inspect it, write:

    console.dir(myFunc); 

    If you run this, the browser shows the same output. That means the dir of myFunc appears three times, but in Chrome’s console, it only prints once. Chrome wraps similar objects together, so even though the internal properties are different, it doesn’t display them separately. To see each property individually, take the next step.

    Let Loop with Dir Output

    Below the dir, write:

    console.log("---"); 

    This acts as a separator. Now, when the browser prints myFunc’s dir, it also prints the separator, making it clear that each instance is separate.

    At the same time, outside the for loop, add:

    console.log("After for loop"); 

    Now, if you check the output, the browser prints ‘After for loop’ first, then 0, 1, 2. When you defined it, the console logs show myFunc and the dashes.

    Let Loop with Dir and Separator Output

    Notice, when i is 0, the closure holds i = 0. When i = 1, the closure holds i = 1. When i = 2, the closure holds i = 2. So, all three values exist as references until the end, which is why you get three separate outputs.

    Let Loop Closure Values Output

    The var Loop Problem

    Full code: example-7.js

    // example-7.js for (var i = 0; i < 3; i++) { function myFunc() { console.log(i); } setTimeout(myFunc, 1000 * i); console.dir(myFunc); console.log("---"); } console.log("After for loop"); console.log(i); 

    But what happens if you replace "let i" with "var i"? After printing 'After for loop', all three outputs show 3. How? When i is 0, there’s no closure because var moves this variable to the global scope. Unlike the previous example, no closure is needed here. Var exists in the global scope, and i changes within that same global variable.

    Var Loop with Dir Output

    So, if you expand the first myFunc in the console and look for i in the global scope, you’ll see i = 3. Why? Because the for loop finishes first, and at the end, i becomes 3. At the moment of 'After for loop', i is 3. If you do “console.log(i)” there, the browser prints 3. This means, when the reference values are called, they still use the reference to that i. Even if i changes later in the program, since the calls happen afterward, the reference values get the updated i.

    That’s why the first call shows 3, the second call shows 3, and the third call also shows 3. If you expand them all, you’ll see i = 3 everywhere. This happens because no closure is used here; it’s referencing the original i in the global scope, which keeps updating.

    Var Loop Closure Values Output

    The difference in scope between let and var is why the output changes completely.

    Fixing the var Loop Problem with IIFE

    To fix this var issue, you can create an IIFE inside the for loop. This IIFE will take one parameter: in this case, the value of your loop variable “i.”

    Full code: example-7.js

    // example-7.js for (var i = 0; i < 3; i++) { (function (i) { function myFunc() { console.log(i); } setTimeout(myFunc, 1000 * i); console.dir(myFunc); console.log("---"); })(i); } console.log("After for loop"); 

    You write the code. Inside the IIFE, you’re passing a parameter named “i.” Of course, you can name it anything you want – you already know that. But for now, just keep it as “i.” Then, when you call the IIFE, pass the loop’s “i” value into it. Nice, right?

    Let’s see what the output looks like. This time, you get 0, 1, and 2 correctly. So, why is it fixed now? Because “i” is now inside its own scope within the IIFE. Whenever you pass “i” to myFunc, a separate copy of that “i” is created as a parameter inside myFunc, and that copy is what gets used inside the function.

    IIFE Loop with Dir Output

    Everything’s clear now, right? If you expand the dirs at the end, you’ll see: the last one has “i = 2” in its closure, the second one has “i = 1,” and the first one has “i = 0.” Perfectly clear, isn’t it?

    IIFE Loop Closure Values Output

    Summary and Key Takeaways

    If you have a solid grasp of the overall concepts discussed here, and if you practice all these examples repeatedly, your understanding of closures will become much stronger.

    Of course, there are more complex examples of closures, but the basics we’ve covered today are the most important. Once you understand them step by step, you’ll be able to create many use cases yourself and debugging will no longer be difficult. Because now, with just a glance at console.dir() or by playing with the code a bit, you can see how closures actually work.

    Not having a good understanding of closures can make you get stuck in many parts of JavaScript, especially when working with asynchronous code.

    To summarize:

    If you’re asked in a job interview, “What is a Closure?” you can answer simply:

    A closure is a mechanism where a function remembers variables outside its own scope and can access them whenever needed.

    In other words, values that aren’t inside the function itself, but the function takes a reference from its parent or outer scope. This is what we call a Closure.

    Closure = Function + Remembered Values

    This is why closures are so important in job interviews. They show how deeply a programmer understands JavaScript. A programmer who understands closures can clearly grasp JavaScript’s internal behavior, memory handling, and asynchronous flow.

    The Importance of Closures

    JavaScript was originally created just for small interactive tasks in the browser, but now you can build large-scale applications, even backend systems, with it. The reason behind this is powerful concepts in JavaScript like Closures, Prototypes, and more.

    Many people say, “I know var, let, const, so tell me about closures.” But as you’ve seen, var, let, and const aren’t that simple either. This is where the understanding of closures begins.

    Final Words

    We covered a lot in this handbook! If reading this all at once feels overwhelming, you can break it into parts and read it step by step. I’ve tried to explain the whole topic very simply, piece by piece. If there are any areas that could be clearer, I appreciate your feedback. But once you’ve really understood and digested this info, you shouldn’t be intimidated by the word “Closure” ever again.

    You can find all the source code from this tutorial in this GitHub repository. If it helped you in any way, consider giving it a star to show your support!

    If you found the information here valuable, feel free to share it with others who might benefit from it. I’d really appreciate your thoughts – mention me on X @sumit_analyzen or on Facebook @sumit.analyzen, watch my coding tutorials, or simply connect with me on LinkedIn. You can also checkout my official website sumitsaha.me for more details about me.


    Source: freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More.

  • Tony Romera – Change The Music (Extended Mix)

    Tony Romera – Change The Music (Extended Mix)

    November 25, 2025
    Music

    Don’t change the music if this track is playing! Subscribe and enable alerts (🔔) for a new track upload daily! Spotify playlist ▶︎ https://nyx.lnk.to/spotify 🫵 DJ & producer recommendations: »» 20% discount on all sample packs (use code NYX20) ➡ https://techhousemarket.com »» 20% discount on all sample packs (use code NYX20) ➡ https://hy2rogen.com »» 20% discount on all vocal packs (use code NYX20) ➡ https://vocalfy.com »» Support the artist and buy records ➡ https://beatport.com/?a_aid=67bedae00dabb »» Fresh new tech house samples & loops ➡ https://loopcloud.com/?a_aid=67bedae00dabb 🎵 Discover track IDs & legendary live moments: »» https://instagram.com/themythofnyx »» https://tiktok.com/@themythofnyx »» https://soundcloud.com/themythofnyx 🎨 Connect with Tony Romera: »» https://facebook.com/tonyromera »» https://soundcloud.com/tonyromera »» https://twitter.com/tonyromera »» https://instagram.com/tonyromera Tags: #tonyromera #changethemusic #extendedmix #themythofnyx


    Source: YouTube.

  • 11 Workouts You Can Do Anywhere

    November 25, 2025
    Health

    These routines can help you stick to a fitness habit while you’re away from home.


    Source: NYT > Well.

  • Let's overreact to Week 12: Is the J.J. McCarthy era already coming to an end?

    November 25, 2025
    Sports

    One of these weeks it must get better. The Minnesota Vikings are a good organization, Kevin O’Connell is an excellent coach, they made the decision to go all-in on quarterback J.J. McCarthy and … well … it just has to get better one of these weeks, right?

    Not this week.

    McCarthy was horrendous again Sunday in a 23-6 loss to the Packers. He completed 12 of 19 passes for 87 yards and two interceptions. Of those 87 yards, 48 went to Justin Jefferson, perhaps the league’s best wide receiver and a man who has averaged 48.3 receiving yards per game in the four games since McCarthy returned from injury and reclaimed the starting quarterback job.

    Yes, the Vikings have offensive line issues. Yes, McCarthy is a young player who has played only six NFL games and might have needed more seasoning than the Vikings originally thought. Yes, at some point, it makes sense to believe that it will get better. But right now, what’s inarguable is that McCarthy is putting up Justin Fields-like stat lines in an offense that has brought out the best in everyone from Sam Darnold to Kirk Cousins to Carson Wentz to Joshua Dobbs. And the Vikings are 4-7, one season removed from finishing 14-3 with Darnold.

    We’re trying not to overreact, but as we assess Week 12 and try to figure out which overreactions might hold up and which ones are mirages, we have to dive in on Minnesota’s QB situation.

    Jump to:
    Vikings will have a new starting QB in 2026?
    Texans to surge and win the AFC South?
    Williams makes Bears tough playoff out?
    Burrow return or not, the Bengals are done?
    Sanders should start the rest of the season?
    Fantasy-related overreactions

    It’s hard to imagine McCarthy not getting a chance to finish out this season as the Vikings’ starter. The damage to their playoff hopes is done, and their only other QB option right now is undrafted rookie Max Brosmer, who could be even more raw than McCarthy is. McCarthy clearly needs experience, and he’s not going to get it on the bench. He’s probably their guy for the remainder of the 2025 season unless he gets hurt again. But 2026 could be a different story.

    Verdict: NOT AN OVERREACTION

    If nothing else, the Vikings will want to bring in a veteran quarterback to add to their young QB room. Think about what the Colts did this offseason, signing Daniel Jones (who, ironically, finished last season with the Vikings) to compete with Anthony Richardson Sr. for the starting job. Jones beat out Richardson, and the Colts are a first-place team.

    Bringing in a veteran doesn’t guarantee a similar result, and it’s possible that McCarthy could make enough advancements this offseason that he would win a competition against an outside veteran. But unless the final six games of this season look a heck of a lot different from the first six games McCarthy has started, Minnesota is going to have to look at every potential option going into 2026. The Vikings can’t throw another season away while waiting for things to click for their 2024 first-round pick.


    The Texans will overtake the Colts and win the AFC South

    Houston began Week 12 in impressive fashion by beating the Bills on Thursday night. The Texans improved to 3-0 with backup quarterback Davis Mills starting while C.J. Stroud has been in concussion protocol, and their swarming defense sacked Josh Allen eight times.

    Houston has recovered from an 0-3 start to poke its head above .500 for the first time this season at 6-5. Meanwhile, the first-place Colts had a 20-9 fourth-quarter lead on the Chiefs on Sunday only for their offense to completely shut down and give away the game in overtime. Indianapolis fell to 8-3 with the bewildering loss.

    Verdict: NOT AN OVERREACTION

    The key to the math here is that the Texans and Colts haven’t played yet. They will do so next Sunday and again in Week 18. That means that if the Texans, who seem likely to get Stroud back for the Week 13 matchup in Indianapolis, win the rest of their games, they will finish ahead of the Colts in the AFC South standings, if only by tiebreaker. The Texans still have the Jaguars — who split the head-to-head season series with Houston — to contend with, too, but we’re working in a scenario in which Houston wins the rest of its games.

    It’s reasonable to expect Jacksonville to drop one more along the way. Houston has a championship-caliber defense and an offense that has been inconsistent at best. If the Texans can get their offense together once Stroud comes back, the defense is good enough to deliver the way it did Thursday night. Houston has a long way to go, and a loss Sunday in Indy would make this very difficult. But it is not impossible.


    Caleb Williams and the Bears are going to be a tough postseason out

    Williams was 19-for-35 for 239 yards and three touchdown passes in Chicago’s 31-28 victory over the Aaron Rodgers–less Steelers on Sunday at Soldier Field. The Bears have won four games in a row and eight of their past nine, and they’re 8-3 and alone in first place in the NFC North. Chicago has a clear identity on offense, with a physical run game setting up Williams and his talented group of receivers for standout second-half performances.

    The defense, which has not been great and was playing without at least five starters because of injuries, made the plays it needed to stop backup quarterback Mason Rudolph and Pittsburgh’s offense. Next up for the Bears is a significant road test against the defending Super Bowl champion Eagles on Friday.

    play
    0:25
    DJ Moore scores his 2nd TD vs. Steelers

    Caleb Williams finds DJ Moore open and hits him for a 25-yard touchdown pass to give the Bears a lead.

    Verdict: OVERREACTION

    The Bears are a great story and a good team that’s well ahead of schedule. Ben Johnson will be smack in the middle of the Coach of the Year race, and deservedly so. But there are a couple of things to note here.

    First, the Bears still must get into the playoffs before they can be a threat to do anything there. Yes, they’re in first place, but the Packers are only a half-game behind and the Lions are lurking one game back. Chicago lost to the Lions in Week 2 and plays them again in Week 18, and the Bears have both of their head-to-head matchups against Green Bay still to come. So that’s two games against the Packers and one each against the Eagles and Lions among their final six games. That’s not easy.

    Additionally, this is a very young team, and Williams remains a very young quarterback who’s immensely talented but still not immune to the type of horrendous strip sack he took in the end zone Sunday that handed the Steelers their second touchdown of the game. I think there are more ups and downs coming for the Bears, even if they make the playoffs. But if they do, they’ll be playing teams that have a lot more experience with January football than they do.


    The Bengals’ season is over with or without Joe Burrow

    Burrow gave us a thrill this week. He returned to full practice status much earlier than expected, offering some hope he could return from his toe injury and play Sunday against the Patriots. He did not, but it sounds as if he could return Thursday night against the Ravens.

    With that as the backdrop, the Bengals played tough Sunday, but their last-minute drive stalled out and they lost to New England 26-20. It was Cincinnati’s fourth loss in a row. The Bengals are now 3-8 and must win the rest of their games to just finish above .500 for the season. Burrow should give them a boost upon returning, but a winning record is a tall task.

    Verdict: NOT AN OVERREACTION

    Losing by less than a touchdown to the 10-2 Patriots is nothing to be ashamed of, but the Bengals’ season probably reached the point of no return when they blew a two-touchdown fourth-quarter lead to the previously winless Jets in Week 8 and then gave up a winning TD in the final minute against the Bears a week later.

    Win those two, and even with losses the past two weeks to the Steelers and Pats, the Bengals would be 5-6 and one game out of first in the AFC North. As it stands, they need to win out, including two games against the surging Ravens, and hope Pittsburgh continues its slide. Plus, the offense hasn’t been the issue with Joe Flacco at quarterback. It’s the Bengals’ atrocious defense that let them down in those two must-win games in Weeks 8 and 9. Burrow isn’t going to fix that.


    The Browns should let Shedeur Sanders start the rest of their games this season

    Cleveland’s wildly popular fifth-round pick made his highly anticipated first NFL start Sunday. He wasn’t spectacular by any stretch, but he certainly wasn’t a disaster. He was 11-for-20 for 209 yards with a touchdown pass and an interception in a 24-10 victory over a horrendous-looking Raiders team. That’s more than fine for a first NFL start.

    Sanders had a beautiful deep pass to Isaiah Bond that set up Quinshon Judkins‘ second touchdown of the game, which put Cleveland up 14-0 early. Sanders’ 66-yard touchdown pass was a screen to running back Dylan Sampson, who did most of the work. But Sanders looked poised and made good decisions when he had to. If there was a concern going in, it was whether Sanders might be susceptible to sacks from Maxx Crosby and the Raiders’ aggressive defensive front. He was sacked only once.

    play
    0:27
    Shedeur slings first career TD pass

    Shedeur Sanders finds Dylan Sampson who races 66 yards for a Browns touchdown vs. the Raiders.

    Verdict: NOT AN OVERREACTION

    Why not? The best-case scenario with Dillon Gabriel is likely him becoming a good backup, and there’s time to figure that out. But Sanders is who the fans want to see, and he didn’t appear to be overwhelmed by the moment. The Browns have two first-round picks in the 2026 draft and need to figure out what they have at quarterback before deciding whether to pursue another long-term solution. Plus, they won Sunday, which is something they’ve done only three times this season.

    The Browns also scored 24 points, which is something they’ve done only four times since the start of the 2024 season. The Raiders are a pushover team, and it’s possible this is the best Sanders will look the rest of the way. But what do the Browns have to lose by sending him back out there?

    Quick-hitter fantasy overreactions

    • Emanuel Wilson is a must-roster running back. NOT AN OVERREACTION. Sure, Josh Jacobs could be back as soon as Thursday and send Wilson back to the Packers’ bench, not to mention fantasy benches. But we just saw what it looks like when Wilson takes over as the starter, and he was an RB1 on Sunday. If Jacobs is on your team, Wilson needs to be on there, too. And even if you don’t have Jacobs, it’s worth having Wilson as a lottery ticket or trade bait.

    • Kenneth Gainwell is passing Jaylen Warren on the Steelers’ RB depth chart. OVERREACTION. Gainwell had 92 rushing yards to Warren’s 68 on Sunday, and he added 30 receiving yards on six catches. But Warren still had nearly twice as many carries (18 to 10) and the Steelers still view him as their starter and their main back. They do love Gainwell and enjoy using their running backs and tight ends, so hold on to Gainwell if you have him. But don’t expect him to suddenly become Pittsburgh’s featured back.

    • Lamar Jackson isn’t a QB1 in fantasy right now. NOT AN OVERREACTION. Jackson must be started in case he goes nuclear, but he’s not even simmering now. He had 153 passing yards, 11 rushing yards and no touchdowns Sunday against the Jets. Jackson has fallen short of 20 rushing yards in half of his games and hasn’t rushed for more than 48 since Week 1. The Ravens are winning and have a soft schedule the rest of the way, so they could just lean on running back Derrick Henry and keep using Jackson as a point guard.

    • Wan’Dale Robinson is a must-start WR the rest of the season. NOT AN OVERREACTION. Malik Nabers is out for the season, and whether it has been Jaxson Dart, Russell Wilson or Jameis Winston, Giants QBs have enjoyed throwing the ball to Robinson, who caught nine passes for 156 yards and a touchdown Sunday. The Giants play wild games and could be in a lot of come-from-behind situations the rest of the way. Robinson should continue to produce — especially once Dart is back.

    • Kareem Hunt is the Chiefs’ RB to have even when Isiah Pacheco returns. OVERREACTION. I don’t know if you should want to start any of them. As someone with the Chiefs told me last week in Denver, “If you’re starting a Chiefs running back, you’d better be hoping for a touchdown.”


    Source: www.espn.com – TOP.

Previous Page
1 … 51 52 53 54 55 … 911
Next Page
MONIMEGA
  • Instagram
  • Facebook
  • Twitter
Gestisci Consenso
Per fornire le migliori esperienze, utilizziamo tecnologie come i cookie per memorizzare e/o accedere alle informazioni del dispositivo. Il consenso a queste tecnologie ci permetterà di elaborare dati come il comportamento di navigazione o ID unici su questo sito. Non acconsentire o ritirare il consenso può influire negativamente su alcune caratteristiche e funzioni.
Funzionale Always active
L'archiviazione tecnica o l'accesso sono strettamente necessari al fine legittimo di consentire l'uso di un servizio specifico esplicitamente richiesto dall'abbonato o dall'utente, o al solo scopo di effettuare la trasmissione di una comunicazione su una rete di comunicazione elettronica.
Preferenze
L'archiviazione tecnica o l'accesso sono necessari per lo scopo legittimo di memorizzare le preferenze che non sono richieste dall'abbonato o dall'utente.
Statistiche
L'archiviazione tecnica o l'accesso che viene utilizzato esclusivamente per scopi statistici. L'archiviazione tecnica o l'accesso che viene utilizzato esclusivamente per scopi statistici anonimi. Senza un mandato di comparizione, una conformità volontaria da parte del vostro Fornitore di Servizi Internet, o ulteriori registrazioni da parte di terzi, le informazioni memorizzate o recuperate per questo scopo da sole non possono di solito essere utilizzate per l'identificazione.
Marketing
L'archiviazione tecnica o l'accesso sono necessari per creare profili di utenti per inviare pubblicità, o per tracciare l'utente su un sito web o su diversi siti web per scopi di marketing simili.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Visualizza le preferenze
  • {title}
  • {title}
  • {title}