node.js - Why doesn't this if/else work in ejs? -


<% if (title != undefined) { %>     <%= title %> <% } elseif(title == undefined) { %>     <%= "trendy analytics" %> <% } %> 

why doesn't sort of thing work in .ejs file?

it's else if not elseif:

<% if (title != undefined) { %>     <%= title %> <% } else if(title == undefined) { %>     <%= "trendy analytics" %> <% } %> 

Comments

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

qt - Change color of QGraphicsView rubber band -

c++ - Visible files in the "Projects" View of the Qt Creator IDE if using the CMake build system -