How do JavaScript closures work?

Javascript is NOT Java.

and oh, try doing a bit of your own research.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.