JSFiddle - React, Tailwind, and code Playground JavaScript if (true){ function foo(){ alert(1) } } else { function foo(){ alert(2) } } foo()