Whale Talk - https://www.codecademy.com/courses/introduction-to-javascript/projects/whale-talk

const input = ‘turpentine and turtles’;

const vowels = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’];

const resultArray = ;

for (let inputIndex = 0; inputIndex < input.length; inputIndex++) {
//console.log(inputIndex is ${inputIndex}.);

for (let vowelIndex = 0; vowelIndex < vowels.length; vowelIndex++); {
console.log(vowelIndex is ${vowelIndex}.);
}
}

I’m getting some error message, and I have no idea why.

on the line

for (let vowelIndex = 0; vowelIndex < vowels.length; vowelIndex++); {

The last ; does not belong there.

Thanks a lot for your help. Indeed the ; does not belong there!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.