I'm struggling to write a program that can search an array containing only numbers to determine if there are any string elements present. The array in question is comprised of the arguments passed to a function. Can anyone lend a hand with this? I've been grappling with it for a good hour now! Here's what I've come up with so far:
const sumAll = function(…args){
const newArray = Array.from(args)
for(let i = 0; i < newArray.length; i++){
if(newArray[i] === NaN){
return “ERROR”
}
}
}