title: If a variable is defined in terms of another, can it reflect changes in the binding of the other?
body: <p>I have a variable whose value is partly defined in terms of another variable. I want to change the value of that variable so that the initial variable also changes. But this doesn’t happen. Look at the second line:</p>
  <pre class="lang-js prettyprint-override"><code>var offset = 0;
  var message = &quot;the number is &quot; + offset;
  </code></pre>
  <p>If I modify <code>offset</code>, then <code>message</code> doesn’t change:</p>
  <pre class="lang-js prettyprint-override"><code>console.log(message); // This says &quot;the number is 0&quot;.
  offset += 20;         // `offset` is changed to `20`.
  console.log(message); // The message is still &quot;the number is 0&quot;.
  </code></pre>
  <p><code>message</code>, in this case, would then be called a “reactive” variable.</p>
  <p>Why doesn’t it work, and how would I solve it?</p>