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

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

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

php - Cloud9 cloud IDE and CakePHP -