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

java - HashSet is empty -

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

security - Java Applet Windows-MY keystore PrivateKey getEncoded is null -