So I am trying to get a button to display the result of a math expression. The problem is that the math expression is stored in a string. This is the code:
function bEqu(){
var test = "2 + 2";
document.getElementById("numButtons").innerHTML += "<br>" + test;
//I am trying to get it to return 4.
}