typeof(array[i]) === string) code example
Example: typeof array
const array = [ 'this', 'is', 'an', 'array' ];
console.log(typeof array); //object
const array = [ 'this', 'is', 'an', 'array' ];
console.log(typeof array); //object