title: how to multiply a variable with every value of an array in javascript?
body: <pre><code>var numbers = [1, 5, 10, 15];
  var doubles = numbers.map(function(x) {
    return x * 2;
    //doubles is now [2, 10, 20, 30]
  </code></pre>
  
  <p>I am following this above example, This is working for a constant 2, how can I mulitply the elements with variable <code>this.price</code>,</p>
  
  <pre><code>var numbers = [1, 5, 10, 15];
  var doubles = numbers.map(function(x) {
     return x * this.price;
  </code></pre>
  
  <p>How can I make this works? <code>this.price</code> is a public variable.</p>