title: Recognise operator and perform calculation
body: <p>I have this problem:</p>
  
  <p>Write a simple interpreter which understands "+", "-", and "*" operations. Apply the operations in order
  using command/arg pairs starting with the initial value of <code>value</code>. If you encounter an unknown command, return -1. You are to ignore B.O.D.M.A.S completely.</p>
  
  <pre><code>Examples of the input and output
  interpret(1, ["+"], [1]) → 2
  interpret(4, ["-"], [2]) → 2
  interpret(1, ["+", "*"], [1, 3]) → 6
  interpret(5, ["+", "*", "-"], [4, 1, 3]) → 6
  </code></pre>
  
  <p>I have tried passing the parameters as multidimensional arrays below. I am trying to solve the problem such that when I do this</p>
  
  <pre><code>let operator = ["+", "-"];
  let integer = 1;
  let intArr = [1, 2];
  let emptyInt;
  let anotherInt;
  let newArray = [integer, operator, intArr];
  </code></pre>
  
  <p>How do I make this work like above? Adding each of the array sequentially</p>