title: KnockoutJS Maths
body: <p>I'm new to knockout and still getting my head around it and I'm wondering how I go about doing simple mathematics (addition and multiplication) using two KO variables.</p>
  
  <p>At the minute I have:</p>
  
  <pre><code>self.popInc1 = ko.observable('0.3');
  self.popIncrease = ko.computed(function () {
      return self.popInc1() + " x " +  self.population();
  });
  </code></pre>
  
  <p>Which is great as it returns and prints out: "<strong>0.3 x 54,556,239</strong>"</p>
  
  <p>However I'd like to multiply the two variables together. I have tried the following to no success.</p>
  
  <pre><code>self.popInc1 = ko.observable('0.3');
  self.popIncrease = ko.computed(function () {
      return Math.floor(self.popInc1() * self.population());
  });
  </code></pre>
  
  <p>At the minute 0.3 is static, but will eventually be dynamic from a text input.</p>