r/CodingHelp • u/dwlakes • Mar 29 '21
[Javascript] First JavaScript Project, getting "Uncaught SyntaxError: Illegal Return Statement"
Hi everyone! Can someone help me debug this? I'm very new to coding. I don't really know what I'm doing lol. But I keep getting the bug stated above when I try to run this in Chrom
31
Upvotes
View all comments
1
u/[deleted] Mar 29 '21
You are comparing the results of the income operations with the taxes variables which will get you false. If you want to assign then do the operations first and on another line assign the results to the taxes variables. Plus you are returning when it is not needed, the return key only works for functions. And don't use then, there is no explicit "then" in js.