Lesson 8 Stuck but good!


#1

I appreciate the fact that these lessons are provided for free, but I am coming across error messages in this lesson that are keeping me from moving forward. When these complete-fron-scratch assignments are given, it seems to me there can be a multitude of errors that happen that we never discussed. I have come across that, have looked at all possible solutions I can think of, and am stuck and can not move forward. The error message I'm getting is "SyntaxError: missing after for-loop initializer". WHAT does THAT mean!


#2

Hi @dbuckeye,

in order to effectively be able to help you, could you please copy & paste your code here so it may be reviewed, and someone will try to get back to you as soon as possible :smile:


#3

Well I got that problem solved. I could have sworn there were commas instead of semi-colons between the whatever-you-call-them in the for statement. Now I get this error "SyntaxError: missing before statement". I swear I have put spaces where I don't think spaces should go. And this editor tells me the error but not where to look for it.


#4

Please listen to what @mike_in_training says:

We are not able to help otherwise.


#5

Here's my code. I know it's messed up but how can I correct it if I can't get past things like missing spaces syntax errors I've never even seen discussed in the lessons?

for (var i = 0; i < 5; i++) {
console.log(i);
}

while(count < 3) {
console.log(count){
count++}

}

#6

Hey @dbuckeye,

You see the { and } in this? Those do not make sense, for console.log is not a loop nor function.

Delete both { and }.


#7

Thanks! Will do. The error message says nothing about { and } and I spent a good 20 minutes looking for a space that should not have belonged (unless this is entirely unrelated). Do I sound confused? I am. Let's see where this wonderful journey takes me next! Thank Again.


#8

Well, one good piece of advice is all it takes. How in the h#$% any of you experts out there ever straightened out the issues of where to put spaces, commas, semi-colons, braces and brackets is beyond me!


#9

Arrrghhhh! I FINALLY understand the { } and ( ) - Amen! But am dizzy from the semi-colons and spaces (Image of me crossed-eyed and birds tweeting around my head inserted here!).