I'm facing an issue with the code below. My goal is to log 'empty array value' whenever there is an empty value, but it's not functioning as expected. Can anyone advise me on what the value of an empty array item is and how I can modify my if statement (please note that if (statement[a].length === 0) doesn't work despite suggestions from other stack overflow posts)?
let statement = prompt("Say Something:");
statement = statement.split('');
for(a = 0; a < statement.length; a++){
if(a === undefined){
console.log('empty array value');
}
}
console.log(statement);