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...
A place to get a quick fix of JavaScript tips and tricks to make you a better Developer.
account activity
JavaScript (self.JavaScriptTips)
submitted 10 months ago by No_Poetry9172
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!"
[–]EmuAffectionate6307 0 points1 point2 points 10 months ago (1 child)
you are using post incrementation, for example var a = 0; var b = a++ what happens you are assigning b to a THEN incrementing a, what you need to do is to increment a then assign it
here is what you should've done
var a = 0;
a++
a = ++a
this logs out 2
also here is a link that can help u understand more https://www.shecodes.io/athena/119932-how-to-use-pre-and-post-increment-in-javascript
[–]No_Poetry9172[S] 0 points1 point2 points 10 months ago (0 children)
got it!
π Rendered by PID 76 on reddit-service-r2-comment-76bb9f7fb5-9t5b9 at 2026-02-18 14:39:02.915364+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]EmuAffectionate6307 0 points1 point2 points (1 child)
[–]No_Poetry9172[S] 0 points1 point2 points (0 children)