How to properly organize check mat. conditions?

There is a sandbox file: https://jsfiddle.net/geoyz7jb/
Tell me how to implement:
The last field 'condition' must contain a condition of the type (a1 & gt; b1), if it is true the field is highlighted in green, no  in red.
I don't understand how to properly organize the reading of the condition itself.JavaScript Anonymous, Aug 16, 2020 
var checkCondition = new Function ('a1, b1, a2, b2', 'return' + condition.value);
if (checkCondition (+ (a1.value), + (b1.value), + (a2.value), + (b2.value))) {
result.style.backgroundColor = '# b6d7a8';
} else {
result.style.backgroundColor = '#fff';
}Anonymous 
To begin with, give examples of what may be there; a1 and b1 are constants or expressions with variables? Otherwise, expressions like
sin (x) & lt; = 1
for any x are possible  but the computer can get tired of proving it.Anonymous
2 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!