Forum Discussion

jose_pita's avatar
jose_pita
Super Contributor
12 years ago
Solved

array instanceOf array

Hi There,



I have to verify the content of a variable without knowing if it is a string or an array so I'm doing:



if((variable instanceof Array) == false && variable =="xxxx")

  //work with the string here



but the instanceOf is always false even if I get an array...



Anyone knows what's happening or an alternative to this?