jquery check if array exists code example
Example 1: jquery check value exists in array
if ($.inArray('example', myArray) != -1)
{
// found it
}
Example 2: javascript not empty array not string
if (Array.isArray(array) && array.length) {
// array exists and is not empty
}