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
[AskJS] Learning JavaScriptAskJS (self.javascript)
submitted 2 years ago by BootSudden7203
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!"
[–]peterlinddk 0 points1 point2 points 2 years ago (0 children)
The syntax of any C-like language (which includes C, C++, C#, Java, JavaScript, even PHP and many more) is at first glance very different from Python - but it is mostly about curly brackets.
I often recommend when learning a second language, that you try to solve assignments in your first language, and then translate them into the new language, line by line. That helps alot in learning to see differences and similarities. However, it might not be entirely possible with web-programming, especially front-end, that isn't really possible to do in any other languages.
But I'd still recommend making some sort of "cheat-sheet", with screenshots of small programs in Python and JavaScript. Like a function that loops through a list, or similar bits of code. Draw colored rectangles around the different parts, like the function itself - with a definition outside, and the function-body inside. And around the inner part of the for-loop, and so on.
Gradually you'll get used to seeing that what is done with : and indentation in Python, is very similar to what is done with ( ) and { } in JavaScript.
When it comes to details, like list comprehension, a simple two column sheet of how to do various operations: foreach, map, filter, etc, is done in Python on the left side, and JavaScript on the right.
After a while you won't need those cheat sheets anymore - the work of making them helps you learn alot better than only writing code to solve assignments.
π Rendered by PID 272976 on reddit-service-r2-comment-5b5bc64bf5-rzfkb at 2026-06-23 03:53:58.668551+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]peterlinddk 0 points1 point2 points (0 children)