Getting syntax error using &&
Hi Guys
I'm getting syntax error using && operator in using JS in my Zen page, the || works fine!?
.png)
Thanks
Product version: Ensemble 2018.1
Discussion (0)0
Comments
- XData block (MimeType) The default is text/xml
- Encoding Translation
Try this:
<FONT COLOR="#000080">XData </FONT><FONT COLOR="#000000">Script
{
<</FONT><FONT COLOR="#000080">script </FONT><FONT COLOR="#800000">type</FONT><FONT COLOR="#000000">=</FONT><FONT COLOR="#008000">"text/javascript"</FONT><FONT COLOR="#000000">>
var v1=1;
var v2=2;
function Colors() {
if (v1=1</FONT><FONT COLOR="#800080">&&</FONT><FONT COLOR="#000000">v2=2) {
alert('</FONT><FONT COLOR="#800080">&<>"</FONT><FONT COLOR="#000000">');
}
}
</</FONT><FONT COLOR="#000080">script</FONT><FONT COLOR="#000000">>
}</FONT>