«« Next » « Previous
«« Next » « Previous

Link Details

DZone voters are special people. Be special. Login and vote now.
Link 3855 thumbnail

By corbanbrook
via schf.uc.org
Published: Sep 25 2006 / 17:37

In mixing your javascript objects with DOM elements or the XMLHttpRequest object, keeping track of scope can be a problem. The solution is often a mess of global variables. You can greatly simplify your code by using closures. This article will present a simple pattern to apply in situations where scope must be preserved.
  • 11
  • 0
  • 339
  • 157

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (11)



Voters Against This Link (0)