I am trying to create an array from a string input with some conditions. It doesn't seem like this a valid way to use push, as it's not return an array of just numbers.
function evaluate(input){
function isOperator(ops){
if(ops == '+' || ops == '*'){
return true;
} return false;
}
var stack = [];
for(var char in input){
if(!isOperator(char)){
stack.push(input[char]);
}
}
return stack;
}
console.log(evaluate('7+**8'));