Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 55827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:26:18+00:00 2026-05-10T17:26:18+00:00

From Wikipedia, the free encyclopedia: Closure (computer science) In computer science, a closure is

  • 0

From Wikipedia, the free encyclopedia: Closure (computer science)

In computer science, a closure is a function that is evaluated in an environment containing one or more bound variables. When called, the function can access these variables. The explicit use of closures is associated with functional programming and with languages such as ML and Lisp. Constructs such as objects in other languages can also be modeled with closures.

To use this inside of JavaScript, can someone point me to an example of how this applies?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:26:19+00:00Added an answer on May 10, 2026 at 5:26 pm

    (using an example from jQuery)

    function SetClassOnHover(className){   $('td').hover(     function () {       $(this).addClass(className);     },     function () {       $(this).removeClass(className);     }   ); } 

    The closure comes into play when the variable className is used inside the scope of each function. When SetClassOnHover exits, both functions must retain a handle on className in order to access its value when the functions are called. That’s what the closure enables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From Wikipedia : Generic programming is a style of computer programming in which algorithms
I know from wikipedia for example that exception handling is used in an application
From wikipedia: uniq -c Generate an output report in default style except that each
I'm extracting a string from wikipedia API that initially looks like this: link text
From Wikipedia : The Last One was a unique software program in 1981 which
Taken from wikipedia: In object-oriented computer programming, a factory is an object for creating
From this wikipedia page: The fundamental difference between context-free grammars and parsing expression grammars
From wikipedia: Dynamic loading is a mechanism by which a computer program can, at
Here's an example from wikipedia that displays C++ template meta-programming: template <int N> struct
From Wikipedia, I read: Joux[3] noted that 2-collisions lead to n-collisions: if it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.