I've been attempting to iterate through an array to verify if it includes an integer, but I'm struggling to make it work and I'm not sure why. Is it necessary to use the map method?
Here is my code snippet:
let words = ['Dog', 'Zebra', 'Fish'];
for(let i = 0; i <= words.length; i++){
if(typeof words[i] === String){
console.log('It does not contain any Numbers')
}
else{
let error = new Error('It does contain Numbers')
console.log(error)
}
}