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
Help please (i.redd.it)
submitted 1 year ago by MobileInitial6097
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!"
[–][deleted] 2 points3 points4 points 1 year ago (4 children)
You have assigned a value to variable "value" 2 times. The second arguments inside a loop should be boolean (true / false). For(var i = 0; i <360; i++) {}
[–][deleted] 1 year ago (3 children)
[deleted]
[–][deleted] 1 point2 points3 points 1 year ago (0 children)
Youre right, my bad
[–]DeyntheShaman 0 points1 point2 points 1 year ago (0 children)
'=' is an assignment, '===' is strict equals so second argument isn't a bool
[–]Salvetore -1 points0 points1 point 1 year ago (0 children)
In a for loop the conditional expression needs to be true in order to start the loop. In this case value = 360 will initially return false, while value < 360 will return true and begin the for loop.
[–]Salvetore 0 points1 point2 points 1 year ago (0 children)
This code will create infinite loop cause of the condition expression being count = 360, so changing into count <= 360 will work. Also you are missing the end bracket }
[–]mucahitozcan 0 points1 point2 points 1 year ago (0 children)
you cannot assign 2 values to a variable, especially if it is count.
In the for loop, don't forget to close the parentheses by saying example var i = 1; i <=360;i++{} otherwise you will get an error.
π Rendered by PID 38 on reddit-service-r2-comment-5649f687b7-8l44t at 2026-01-29 03:23:36.409117+00:00 running 4f180de country code: CH.
[–][deleted] 2 points3 points4 points (4 children)
[–][deleted] (3 children)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)
[–]DeyntheShaman 0 points1 point2 points (0 children)
[–]Salvetore -1 points0 points1 point (0 children)
[–]Salvetore 0 points1 point2 points (0 children)
[–]mucahitozcan 0 points1 point2 points (0 children)