title: Math.round not working--other answers not helping
body: <p>Trying to edit an existing (working, shown first) script that delivers two decimals so that it will only deliver rounded numbers - my edit shown second (example <a href="http://www.fabulousyarn.com/malabrigo-rasta-frankochre.shtml" rel="nofollow noreferrer">here</a>). To be clear I want simple integers i.e. 18 not 18.00.</p>
  
  <pre><code>function D(r){
      if (r.stat === "ok") {
          for (var k in r.items) {
              document.write(r.items[k].inventory)
          }
      }
  }
  
  function D(r){
      if (r.stat === "ok") {
          for (var k in r.items) {
              document.write(r.items[k].inventory)
              Math.round()
          }
       }
  }
  </code></pre>