Question
How to use operator "AND" in a conditional statement
Hi there,
I can't seem to find anything for an && condition.
I have used an "OR" for now - but this won't work the condition that I need:
Landing page code snippet:
<% if (recipient.mobilePhone== "" || recipient.phone== "" ) {%>
<!-- Has either a Phone or Mobile only -->
<span class="nl-dce-field" id="span162503854014471" data-nl-expr="[recipient/@mobilePhone]">[Mobile]</span>
<span class="nl-dce-field" id="span162509825182771" data-nl-expr="[recipient/@phone]">[Phone]</span>.
<% } else { %>
<!-- Has Phone AND Mobile -->
<span class="nl-dce-field" id="span162503854014471" data-nl-expr="[recipient/@mobilePhone]">[Mobile]</span></strong> or
<strong class="badge-teal"><span class="nl-dce-field" id="span162509825182771" data-nl-expr="[recipient/@phone]">[Phone]</span>.
<% } %>