mardi 22 mars 2016

Empty array returning false when compare but when is is alone returning true...why like this

if([]==true) //evalutes as false

//when i check empty array with true, if evaluating [] as false so it if condition return false

if([]) //evalutes as true

//when i check empty array alone, if evaluating [] as true so it if condition return true

why it is evaluating like that?

thanks

Aucun commentaire:

Enregistrer un commentaire