Q: Is it possible to extract numbers and operators out of an array in order? I am currently working on making a calculator using HTML, CSS, and JavaScript (particularly jQuery), and I'm trying to set it up so that whenever you click an operator button after inputting a number it will send the number and operator to an array in order. 
For example: the user inputs 5 and presses the multiply operator. Upon pressing the multiply button, it will push the 5 and the * to newArray like such: newArray = ["5", "*"]. Then upon pressing enter it will push the 1 to the end.
My goal is to extract these from the array to make a single expression which ultimately, in the given case, would output 5.

A: Join the array which results in "5*1" and eval it - jsFiddle Example
var newArray = ["5", "*", "1"]

var output = eval(newArray.join("")) // 5

