Can you help me figure out my code?

Sorry the code is so close together. For some reason I could not copy and paste it. I can’t figure out what is wrong in my code that it is printing all of the letters BEFORE the final UUEEIEEAUUEE. This is under the whale talk project in learning Javascript.

Thanks for your help!

I’m guessing you want to log the final statement only?
I would guess that your console.log is within the scope of the for-loop. Try putting the bracket on line 17 before the console.log on line 15 and it might work.

Just tried that and it spit out the same thing only this time about 10X each! lol

What happens when you put the console.log() after the bracket on line 17; outside of the loop completely?

2 Likes

Thanks! That did it! I didn’t think to try that.

Hahaha it was one or the other :slight_smile:. Rule of thumb, do the opposite the pita does.

1 Like

For readability you should consider expanding your editor, or do this is a text-editor :sweat_smile:… I personally find it hard to keep tabs of all the brackets in the narrow column view.

I had it spread out more but for whatever reason I could not copy my code from codecademy over to the forum. I tried several things which is why I did a screenshot.

1 Like

No worries !! :sweat_smile: Cheers