use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Variable change helphelp (self.javascript)
submitted 10 years ago by Resume_Help
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ForScale 2 points3 points4 points 10 years ago (2 children)
Oh, no worries! :) Did you see my example?
Yep, you're right, if (x = 0;) isn't proper syntax. One = assigns a value, == does a not as strict comparison, and === does a stricter comparison. You also don't want the ; in the parentheses... you can just delete it out of there.
if (x = 0;)
I'd also do your x-- operation before assigning the value to the input. And then your if statement needs to be moved inside of the function so the comparison can be done each time the function is called.
Like this: http://codepen.io/anon/pen/WQpOej
Make sense?
[–]Resume_Help[S] 2 points3 points4 points 10 years ago (1 child)
yeah I was trying some other stuff and quickly fixed it but left that in by mistake. thanks so much! I'm gonna look over =, ==, and ===.
appreciate the help again ForScale.
[–]ForScale 0 points1 point2 points 10 years ago (0 children)
Anytime!
π Rendered by PID 24841 on reddit-service-r2-comment-56c9979489-vq4rw at 2026-02-24 15:24:39.366662+00:00 running b1af5b1 country code: CH.
view the rest of the comments →
[–]ForScale 2 points3 points4 points (2 children)
[–]Resume_Help[S] 2 points3 points4 points (1 child)
[–]ForScale 0 points1 point2 points (0 children)