title: Javascript Closures. Lexical vs function context.
body: <p>My question is why the following code prints 1 instead of 500; 
    When the callback is invoked and it doesnt find the variable count, doesnt it first looked at the context of func1 ? </p>
  
  <pre><code>function func1(cb){
    let count = 500
    cb()
  }
  
  
  let count = 1
  
  function func2() {
    console.log(count);
  }
  
  
  func1(func2) 
  </code></pre>