title: How to show an alert when a variable is changed?
body: <p>I need to display an alert when a value is changed:</p>
  
  <pre><code>if(myVal == true) {
      alert('yes');
  } else {
      alert('no');
  }
  </code></pre>
  
  <p>This should be executed everytime <code>myVal</code> changes. How to achieve this?</p>