how to know the element of array is string or not javascript code example Example: in javascript check is is an array or not Array.isArray(yourItem)