Tag Archives: undefined

How to conditionally display variables with EJS

Short version: <%= user.name ? user.name : ” %> When using EJS as a template language, it can be a bit of a mystery how to concisely display variables if and only if they are defined. For example, if you … Continue reading

Posted in coding, Development | Tagged , , , , | Leave a comment