I have a question in JavaScript context. I'm a little confused by this issue. The code below describes my question:
$(..).someFunction{
  var outOfScope = "OUT OF SCOPE!";
  $('somelink').click(handler);
  function handler() {
    alert(outOfScope);
  }
}
My question is: how outOfScope variable (which was defined outside the handler) is seen inside the handler?