Whale talk project

Hi! I’m having some trouble with the whale talk project…I’m logging only “E”‘s for some reason. I really don’t know what the problem is. I watched the walkthrough video and it looks like I’m doing everything correct/the same, except I didn’t create a new variable for the iterator, I used "i’ and “j”. Any help would be much appreciated.

Hi there,

Could you post your code here for reference? So we know what to help you with?

(Note: be sure to remove all of the instruction text before making your post(s)!)

Ok thanks!

const input = “turpentine and turtles”;

const vowels = [“a”, “e”, “i”, “o”, “u”];

let resultArray = ;

for (i = 0; i < input.length; i++) {
console.log(input[i] + " is " + i);
if (input[i] === “e”) {
if (input[i] === “u”) {
for (j = 0; j < vowels.length; j++) {
if (input[i] === vowels[j]) {
// console.log(input[i]);

let resultString = resultArray.join(“”).toUpperCase();

So, take a look at your code (specifically the }). There is a small issue that is causing just:

to run.

Oh yes the brackets were in the wrong place. Thank you!

1 Like