« Home | Create tunnel via the ssh command in linux. » | Find tables which are empty in database. » | Svn branching strategies. » | Excellent tutorial on linux usermanagement and sud... » | Using Grep to search in files » | Android implicit intents various intents creation ... » | Find the unused selectors in a webpage. » | Installing missing dependencies redhat / fedora / ... » | Query to delete rows with duplicate columns. » | Mysql do bulk operations on tables, columns, infor... » 

Wednesday, August 17, 2011 

javascript functions.

Every function in javascript has:
- this (the current object on which it is using  - if no object is used and the function is just called like that it uses window object as this)
- scope (all the variables that are defined with in the scope of this function and its parents are accessible via this scope).
- Functions have lexical scope, ie scope is defined when the function is defined. As soon as the function is called, this scope is used to assign the latest values to the variables used in the function. This is how closures work.