jose_pita
12 years agoSuper Contributor
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?
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?