If you do not want to use eval because it runs the whole parser for such simple task you can use a simple switch.
BTW: final is a reserved word, do not use it as a variable name.
a = Math.random();
b = Math.random();
az = Math.round(a);
// to avoid division by zero
bz = Math.round(b) + 1;
var chooseoperator = ['+','-','*','/'];
var operator = chooseoperator[Math.floor(Math.random() *chooseoperator.length)];
var Final=az+operator+bz;
alert(Final);
var result;
switch(operator){
case '+' : result = az + bz;
break;
case '-' : result = az - bz;
break;
case '*' : result = az * bz;
break;
case '/' : result = az / bz;
// if you do not want the addition of 1 above
// check the result for "Infinity" and(!) "NaN" here, e.g.:
// if(Math.abs(result) === Infinity || isNaN(result)){
// alert("Division by zero")
// }
// "isNaN" checks for "0/0" and "Infinity" checks for x/0
break;
default: alert("something unexpected happend");
break;
}
// the result is now in the aptly named variable "result"
alert("result = " + result);
Oh, I am too slow, it seems.