Can you please help me figure out what is wrong with this code?
If you don't specify what "this code" is, it's pretty hard to tell what is wrong.
sorry, here you go. can you see it now?
There is a semicolon after j++ in the for loop where you should not have one.
yep, that was it. thanks a lot!
any tips on how to spot mistakes, or is just the experience that matters?
Mostly experience of having these error made (or seen) elsewhere. What might help is to distinguish the error e.g. syntax error says that there is something wrong with your syntax (who'd have thought) so you can look for the syntax of a for loop if statement or whatever and compare it to your code. Reference Errors on the other hand indicate that you use a variable without declaring it or defining it. So looking for the mentioned variable might be the key. And if you don't get any of these "real errors" than it is probably a problem with not fitting the requirements of the instruction. So although some are misleading (especially the last category) reading the error message carefully often yields some valuable information on how to solve the error.
That makes sense. Thanks again!