javascript check typeof object is string or array code example Example: javascript typeof array Array.isArray(obj)