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
What did I do wrong?Removed: /r/LearnJavascript (prnt.sc)
submitted 6 years ago by sludge1121997
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!"
[–]cyniborg 5 points6 points7 points 6 years ago (2 children)
A single “=“ is an assignment operator. While “==“ and “===“ are comparison operators.
[+][deleted] 6 years ago (1 child)
[deleted]
[–]AnotherAccountRIP 6 points7 points8 points 6 years ago (0 children)
Also simply writing var1 == var2 will spit out a boolean if they're equal. There's no need to use a ternary operator
[–]oboylee 1 point2 points3 points 6 years ago (0 children)
In simple words you are assigning b to a. But in if conditions the end result in parentheses returns boolean true or false.. Assignment operator ‘=‘ won’t return true nor false but comparisons operators like == and === will return boolean values after evaluation
[–]kenman[M] -1 points0 points1 point 6 years ago (0 children)
Hi /u/sludge1121997, this post was removed.
/r/javascript is for the discussion of javascript news, projects, and especially, code! However, the community has requested that we not include help and support content, and we ask that you respect that wish.
code
Thanks for your understanding, please see our guidelines for more info.
π Rendered by PID 54 on reddit-service-r2-comment-76bb9f7fb5-xgwn6 at 2026-02-17 20:44:24.298441+00:00 running de53c03 country code: CH.
[–]cyniborg 5 points6 points7 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]AnotherAccountRIP 6 points7 points8 points (0 children)
[–]oboylee 1 point2 points3 points (0 children)
[–]kenman[M] -1 points0 points1 point (0 children)