Driver program to test above function
let expr1 = " " ; let res = evaluate ( expr1 ) ; if ( res == - 1 ) document . write ( expr1 + " " ) ; elsedocument . write ( " " + expr1 + " " + res + " " ) ; let expr2 = " " ; res = evaluate ( expr2 ) ; if ( res == - 1 ) document . write ( expr2 + " " ) ; elsedocument . write ( " " + expr2 + " " + res + " " ) ; let expr3 = " " ; res = evaluate ( expr3 ) ; if ( res == - 1 ) document . write ( expr3 + " " ) ; elsedocument . write ( " " + expr3 + " " + res + " " ) ; let expr4 = " " ; res = evaluate ( expr4 ) ; if ( res == - 1 ) document . write ( expr4 + " " ) ; elsedocument . write ( " " + expr4 + " " + res + " " ) ;