title: How to call a object method on an array?
body: <p>I am using math.js and I want to call the method <code>addFive</code> on every element of the array <code>x</code>. If I call <code>addFive</code> on a variable like <code>y</code>, it works fine. I get an output of 10. </p>
  
  <pre><code>x = math.matrix([2,3,4]);
  let y= 5;
  function example(){
      this.a=5;
      this.addFive = function(x){
          return (x+this.a);
      }
  }
  ex = new example();
  let w = ex.addFive(y);
  console.log(w);
  </code></pre>
  
  <p>when I tried this,</p>
  
  <pre><code>let w = math.map(x, addFive);
  console.log(w);
  </code></pre>
  
  <p>I am getting an error that <code>addFive is not defined</code>. is there a way around this without using loops?</p>