Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ejs / javascript check if array/object exists and is not empty

<% if(typeof papers == 'object' && papers.length > 0){ %>
  // whatever you want to do with 'papers' array
  <% } %>
 
PREVIOUS NEXT
Tagged: #ejs #javascript #check #exists #empty
ADD COMMENT
Topic
Name
9+5 =