title: Clarification on Heads First Javascript Book puzzle
body: <p>Why did sherlock decide not to investigate the case? How could he know that the criminal would never be able to steal the money just by looking at the code? Is there one problem with the code? Or more? Here's our solution.</p>
  
  <pre><code>  var balance = 10500;
  var cameraOn = true;
  
  function steal(balance, amount) {
      cameraOn = false;
      if (amount &lt; balance) {
          balance = balance - amount;
      }
      return amount;
      cameraOn = true;
  
  
  
  
  
  }
  
  
  var amount = steal(balance, 1250);
  console.log("Criminal: you stole " + amount + "!");
  </code></pre>
  
  <p>Now the book points out that the balance put parameter is shadowed. And that the security camera isn't turned back on. I have been trying to fix this so it would work. I moved the return amount; after the cameraOn = true; 
  Would the cameraOn need to be returned? as it is also a global within the function?
  And what would the best approach for updating the balance be? I tried updating it after the function but I was thinking the function should really update it? And then return balance; ?</p>
  
  <p>Any direction would be appreciated as the book doesn't tell you the approach to fix it. I'm just trying to get my head around it.</p>