Home | Mailing List | Blog | Tutorial Videos

Array as boolean

What does this snippet of code returns?

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

Select one: