Home | Mailing List | Blog | Tutorial Videos

Array as boolean

What does the below function return?

function ArrayBoolean(){
  if([] && [1])
    return [true, true];
  else if([] && ![1])
    return [true,false];
  else if(![] && [1])
    return [false,true];
  else
    return [false,false];
}
ArrayBoolean();

Select one: