JSFiddle - React, Tailwind, and code Playground

JavaScript

var print = function(v) {console.log(v);};
aif=function(it, t, f){  if (eval(it)) return eval(t); eval(f)}
var print = function(v) {alert(v);};

aif("1", "print(it+' is true')", "print(it+ ' is false')")
aif("0", "print(it+' is true')", "print(it+ ' is false')")