EJS is a simple templating language that lets you generate HTML markup with
plain JavaScript. No religiousness about how to organize things.
No reinvention of iteration and control-flow. It's just plain JavaScript.
function foo(doBar)
{
function bar()
{
console.log( 'bar' );
}
function baz()
{
console.log( 'baz' );
}
window.baz = baz;
if ( doBar ) bar();
}