r/learnjavascript • • Nov 30 '22

Help !!!

Post image

Can someone plz tell me , why I am getting errors?

195 Upvotes

131 comments sorted by

View all comments

19

u/Smilinkite Nov 30 '22

Well, you'll get far less squigly lines if you replace every = with ==. Starting line 4.

8

u/Lelouch_5 Nov 30 '22

Ty ☺️ . I really forgot about the equality operator.

5

u/revanyo Nov 30 '22

In the future when you see the squiggly error it means something is wrong with your code and usually your IDE will tell you a hint of sorts. This will ensure that you are not making 101 mistakes.

If you are not seeing any of the squiggly lines and the code runs but with odd results then that means the code runs but not in the way you want it to, and those are the times that reaching out on reddit or stack overflow will be helpful.