I am trying to allow for a if statement condition to be placed into a text field and then for Javascript to take that text field and return if it would be true or false.
logicStr = document.getElementById('logicString').value;
if(logicStr){
alert("true");
}else{
alert("false");
}
with the example above if the input was "1 == 0" the alert should be false. But Javascript is seeing it as me asking is the string not null and it isnt so it alerts true. I need to somehow convert to a logic boolean statement.