title: Show how long has passed since last click?
body: <p>I want to save the time the user clicks on the page. So I can later return how long ago he clicked with a function.</p>
  
  <p>I think it should basically work like this:</p>
  
  <pre><code>var currentTime = new Date();
  var lastClick = currentTime.getTime();
  $("body").click(function () {
  var lastClick = currentTime.getTime();
      });
  
  function howlong() {
  console.log('last click was: ' + currentTime.getTime() - lastClick + 'ms ago');
  }
  </code></pre>
  
  <p>However I Cannot make it work. howlong keeps returning 0. What I am doing wrong?</p>