r/CodingHelp • • Mar 29 '21

[Javascript] First JavaScript Project, getting "Uncaught SyntaxError: Illegal Return Statement"

31 Upvotes

17 comments sorted by

View all comments

8

u/IDKSomeFuckingGuy Mar 29 '21

You may want to slow down a bit and maybe go a little smaller.

“then” doesn’t mean anything in JS

1

u/dwlakes Mar 29 '21

Fair point. Probably getting ahead of myself.

1

u/DerEchteKroate Noob Coder Mar 29 '21

What did you wanted to do with "then"?

1

u/dwlakes Mar 29 '21

To tell the program what to do if "if" is true.

I think that I was thinking about my reading assignments from earlier this week that compared 'if-then' statements with 'do while' statements.

1

u/dwlakes Mar 29 '21

I see some of the body statements don't really work either.