I set an array which have key in string Like below in my code :
var a = new Array();
a[1] = new Array();
a[1]['mystring'] = new Array();
a[1]['mystring'] = 'test';
if(isNullValues(a[1])) {
alert("Array Empty.");
}
function isNullValues(data) {
if (data == undefined || data == null || data.length == 0 || data == "") {
return true;
} else {
return false;
}
}
It alerts me Array Empty string. But it shouldn't return this?
else{console.log(1)}), and it does log 1.