Skip to content

Instantly share code, notes, and snippets.

Created October 18, 2016 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f535d1f09d9e2befb7f03cdb25484849 to your computer and use it in GitHub Desktop.
Save anonymous/f535d1f09d9e2befb7f03cdb25484849 to your computer and use it in GitHub Desktop.
if false or false or false....
<% for(var i = 0; i < list.length; i++){ %>
<li siId="<%= list.at(i).get("id") %>">
<%= list.at(i).get("companyName") %>
<% if((list.at(i).get("city") != null && list.at(i).get("city") != "" && list.at(i).get("city") != undefined) || (list.at(i).get("state") != null && list.at(i).get("state") != "" && list.at(i).get("state") != undefined) || (list.at(i).get("country") != null && list.at(i).get("country") != "" && list.at(i).get("country") != undefined)){ %> - <% } %>
<% if(list.at(i).get("city") != null && list.at(i).get("city") != "" && list.at(i).get("city") != undefined){ %>
<%= list.at(i).get("city") %>
<% } %>
<% if((list.at(i).get("city") != null && list.at(i).get("city") != "" && list.at(i).get("city") != undefined) && (list.at(i).get("state") != null && list.at(i).get("state") != "" && list.at(i).get("state") != undefined) && (list.at(i).get("country") != null && list.at(i).get("country") != "" && list.at(i).get("country") != undefined)){ %>, <% } %>
<% if(list.at(i).get("state") != null && list.at(i).get("state") != "" && list.at(i).get("state") != undefined){ %>
<%= list.at(i).get("state") %>
<% } %>
<% if((list.at(i).get("city") != null && list.at(i).get("city") != "" && list.at(i).get("city") != undefined) && (list.at(i).get("state") != null && list.at(i).get("state") != "" && list.at(i).get("state") != undefined) && (list.at(i).get("country") != null && list.at(i).get("country") != "" && list.at(i).get("country") != undefined)){ %>, <% } %>
<% if(list.at(i).get("country") != null && list.at(i).get("country") != "" && list.at(i).get("country") != undefined){ %>
<%= list.at(i).get("country") %>
<% } %>
</li>
<% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment