Javascript "And"s. How to?

I've got some javascript, something in a local function like

    if (a==1){

and I've just realized I need to see what B is doing, too. So now it needs to be something like...

    if((a==1) and (b==1)){

Something like that. That works.

Ideas?


try using && instead of and.
if((a==1) && (b==1)){


Many thanks. I think that got it. Not sure about the inner parens - I left mine off but it seems to work.

Whew - this saved me all sorts of tangles!


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums