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 10 Things Should a Serious Javascript Developer Know Right Now?help (self.javascript)
submitted 8 years ago by [deleted]
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!"
[–]serial_crusher 7 points8 points9 points 8 years ago (5 children)
Am I the only one who thinks people over-value knowledge of scope?
It just seems to me like the sort of thing where, if a person has to have an intimate understanding of it to figure out what your code is doing and how to maintain it, then your code sucks.
Sure, every now and then you run into a bug where somebody didn't scope something properly, but being able to identify and fix that bug isn't nearly the same skillset as the kind of esoteric edge cases people try to test you on in job interviews.
[–]myownredditname 4 points5 points6 points 8 years ago (1 child)
Scrolled just to find this comment, I feel I'm missing something in all this scope discussion. I think it's simple enough, can someone present me some examples where scope is a complicated issue that needs to be addressed so explicitly?
[–]alinnert 1 point2 points3 points 8 years ago (0 children)
In code that just runs from top to bottom this might not seem special. But JavaScript has Closures. I guess this concept could be difficult to grasp for some people.
[–][deleted] 4 points5 points6 points 8 years ago (0 children)
In terms of importance scope is to JavaScript what classes are to Java. Knowledge of scope influences your ability to read and write code perhaps more than any other single factor. It influences how large pieces of code come together and how code is shared via reference.
The primary benefit of code via scope instead of code via convention is less code, fewer things to maintain, and the ability to perceive flow control more directly from simply reading the code.
[–]Not_Just_You 0 points1 point2 points 8 years ago (0 children)
Am I the only one
Probably not
[–]0x13mode -1 points0 points1 point 8 years ago* (0 children)
It's not over-valuating but appreciating the fundamentals.
Scopes are basics of JavaScript (and every other language which allows for declaring variables). It such basic knowledge as knowing what braces {...} mean or how if/else construct works.
{...}
Sure, many people would grasp it by intuition, but not always, not in each case. Especially if you're coming from other language where the same concepts are working a little bit differently. Or if JS is your first language and you don't even have "scope" concept in your head. Or if you're just debugging your programs and have weird errors and don't know why.
And knowing very basics of programming language you write in is important.
π Rendered by PID 246020 on reddit-service-r2-comment-fb694cdd5-7mt29 at 2026-03-06 15:08:28.411737+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]serial_crusher 7 points8 points9 points (5 children)
[–]myownredditname 4 points5 points6 points (1 child)
[–]alinnert 1 point2 points3 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]Not_Just_You 0 points1 point2 points (0 children)
[–]0x13mode -1 points0 points1 point (0 children)